diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2011-05-17 11:04:44 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-05-17 11:04:44 +0200 |
commit | 9937a5e2f32892db0dbeefc2b3bc74b3ae3ea9c7 (patch) | |
tree | 0448e96b503deb71dd8a1228da94a9fc22a57d48 /include/scsi | |
parent | 70087dc38cc77ca8f46059564c00338777734762 (diff) | |
download | kernel_samsung_aries-9937a5e2f32892db0dbeefc2b3bc74b3ae3ea9c7.zip kernel_samsung_aries-9937a5e2f32892db0dbeefc2b3bc74b3ae3ea9c7.tar.gz kernel_samsung_aries-9937a5e2f32892db0dbeefc2b3bc74b3ae3ea9c7.tar.bz2 |
scsi: remove performance regression due to async queue run
Commit c21e6beb removed our queue request_fn re-enter
protection, and defaulted to always running the queues from
kblockd to be safe. This was a known potential slow down,
but should be safe.
Unfortunately this is causing big performance regressions for
some, so we need to improve this logic. Looking into the details
of the re-enter, the real issue is on requeue of requests.
Requeue of requests upon seeing a BUSY condition from the device
ends up re-running the queue, causing traces like this:
scsi_request_fn()
scsi_dispatch_cmd()
scsi_queue_insert()
__scsi_queue_insert()
scsi_run_queue()
scsi_request_fn()
...
potentially causing the issue we want to avoid. So special
case the requeue re-run of the queue, but improve it to offload
the entire run of local queue and starved queue from a single
workqueue callback. This is a lot better than potentially
kicking off a workqueue run for each device seen.
This also fixes the issue of the local device going into recursion,
since the above mentioned commit never moved that queue run out
of line.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 2d3ec50..dd82e02 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -169,6 +169,7 @@ struct scsi_device { sdev_dev; struct execute_work ew; /* used to get process context on put */ + struct work_struct requeue_work; struct scsi_dh_data *scsi_dh_data; enum scsi_device_state sdev_state; |