Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 2018 05:43:21 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329812 - head/sys/cam
Message-ID:  <201802220543.w1M5hL8Q068794@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802220543.w1M5hL8Q068794>