svn commit: r268816 - in stable/10/sys/cam: ata scsi

看板FB_svn作者時間11年前 (2014/07/18 07:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
Author: imp Date: Thu Jul 17 23:05:20 2014 New Revision: 268816 URL: http://svnweb.freebsd.org/changeset/base/268816 Log: MFC: >r267118 | imp | 2014-06-05 11:13:42 -0600 (Thu, 05 Jun 2014) | 9 lines >The code that combines adjacent ranges for BIO_DELETEs to optimize >trims to the device assumes the list is sorted. Don't apply the >optimization of not sorting the queue when we have SSDs to the >delete_queue, since it causes more discard traffic to the drive. While >one could argue that the higher levels should coalesce the trims, >that's not done today, so some optimization at this level is needed. >CR: https://phabric.freebsd.org/D142 Modified: stable/10/sys/cam/ata/ata_da.c stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_da.c ============================================================================== --- stable/10/sys/cam/ata/ata_da.c Thu Jul 17 22:58:05 2014 (r268815) +++ stable/10/sys/cam/ata/ata_da.c Thu Jul 17 23:05:20 2014 (r268816) @@ -732,10 +732,7 @@ adastrategy(struct bio *bp) ((softc->flags & ADA_FLAG_CAN_CFA) && !(softc->flags & ADA_FLAG_CAN_48BIT)), ("BIO_DELETE but no supported TRIM method.")); - if (ADA_SIO) - bioq_disksort(&softc->trim_queue, bp); - else - bioq_insert_tail(&softc->trim_queue, bp); + bioq_disksort(&softc->trim_queue, bp); } else { if (ADA_SIO) bioq_disksort(&softc->bio_queue, bp); Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Thu Jul 17 22:58:05 2014 (r268815) +++ stable/10/sys/cam/scsi/scsi_da.c Thu Jul 17 23:05:20 2014 (r268816) @@ -1383,10 +1383,7 @@ dastrategy(struct bio *bp) * Place it in the queue of disk activities for this disk */ if (bp->bio_cmd == BIO_DELETE) { - if (DA_SIO) - bioq_disksort(&softc->delete_queue, bp); - else - bioq_insert_tail(&softc->delete_queue, bp); + bioq_disksort(&softc->delete_queue, bp); } else if (DA_SIO) { bioq_disksort(&softc->bio_queue, bp); } else { @@ -2805,16 +2802,9 @@ cmd6workaround(union ccb *ccb) da_delete_method_desc[old_method], da_delete_method_desc[softc->delete_method]); - if (DA_SIO) { - while ((bp = bioq_takefirst(&softc->delete_run_queue)) - != NULL) - bioq_disksort(&softc->delete_queue, bp); - } else { - while ((bp = bioq_takefirst(&softc->delete_run_queue)) - != NULL) - bioq_insert_tail(&softc->delete_queue, bp); - } - bioq_insert_tail(&softc->delete_queue, + while ((bp = bioq_takefirst(&softc->delete_run_queue)) != NULL) + bioq_disksort(&softc->delete_queue, bp); + bioq_disksort(&softc->delete_queue, (struct bio *)ccb->ccb_h.ccb_bp); ccb->ccb_h.ccb_bp = NULL; return (0); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
文章代碼(AID): #1Jo5ppBM (FB_svn)