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
This commit is contained in:
imp 2018-02-22 05:43:20 +00:00
parent a22c49eb0c
commit 31fe0d8c8c

View File

@ -1392,7 +1392,7 @@ cam_iosched_queue_work(struct cam_iosched_softc *isc, struct bio *bp)
* 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++;