diff options
author | smh <smh@FreeBSD.org> | 2013-04-26 16:31:03 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2013-04-26 16:31:03 +0000 |
commit | bb900984f9db5cb178387e23dc53b5a43208a8e1 (patch) | |
tree | 06728d4e512f5c0a768abc0695118c3121b4ceb7 /sys/cam/ata | |
parent | 04187593784330ee90171da3112f318e802f5341 (diff) | |
download | FreeBSD-src-bb900984f9db5cb178387e23dc53b5a43208a8e1.zip FreeBSD-src-bb900984f9db5cb178387e23dc53b5a43208a8e1.tar.gz |
Added automatic detection of non-rotating media which disables the
use of BIO queue sorting, hence optimising performance for devices
such as SSD's
Reviewed by: scottl
Approved by: pjd (mentor)
MFC after: 2 weeks
Diffstat (limited to 'sys/cam/ata')
-rw-r--r-- | sys/cam/ata/ata_da.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index b39a04b..0039fd8 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1155,7 +1155,11 @@ adaregister(struct cam_periph *periph, void *arg) snprintf(announce_buf, sizeof(announce_buf), "kern.cam.ada.%d.write_cache", periph->unit_number); TUNABLE_INT_FETCH(announce_buf, &softc->write_cache); - softc->sort_io_queue = -1; + /* Disable queue sorting for non-rotatational media by default */ + if (cgd->ident_data.media_rotation_rate == 1) + softc->sort_io_queue = 0; + else + softc->sort_io_queue = -1; adagetparams(periph, cgd); softc->disk = disk_alloc(); softc->disk->d_devstat = devstat_new_entry(periph->periph_name, |