svn commit: r329812 - head/sys/cam

Warner Losh imp at FreeBSD.org
Thu Feb 22 05:43:21 UTC 2018


Author: imp
Date: Thu Feb 22 05:43:20 2018
New Revision: 329812
URL: https://svnweb.freebsd.org/changeset/base/329812

Log:
  Don't sort TRIMs.
  
  While the code for ada and da both assume that the trim list is
  ordered when doing the coaleascing the TRIMs, it turns out that
  creating the sorted list uses more resources than are saved by having
  slightly fewer trims sent to the device.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==============================================================================
--- head/sys/cam/cam_iosched.c	Thu Feb 22 04:30:52 2018	(r329811)
+++ head/sys/cam/cam_iosched.c	Thu Feb 22 05:43:20 2018	(r329812)
@@ -1392,7 +1392,7 @@ cam_iosched_queue_work(struct cam_iosched_softc *isc, 
 	 * the work on the bio queue.
 	 */
 	if (bp->bio_cmd == BIO_DELETE) {
-		bioq_disksort(&isc->trim_queue, bp);
+		bioq_insert_tail(&isc->trim_queue, bp);
 #ifdef CAM_IOSCHED_DYNAMIC
 		isc->trim_stats.in++;
 		isc->trim_stats.queued++;


More information about the svn-src-all mailing list