Commit 996bfdf1 authored by James Bottomley's avatar James Bottomley Committed by Christoph Hellwig

fix queue plug performance problem found by akpm

Fix is to only plug on prep deferral if the device queue is empty
(otherwise we can rely on returning I/O to restart the queue)
parent a1a477f9
......@@ -984,10 +984,11 @@ void scsi_request_fn(request_queue_t * q)
break;
if(!req) {
/* can happen if the prep fails
* FIXME: elv_next_request() should be plugging the
* queue */
blk_plug_device(q);
/* If the device is busy, a returning I/O
* will restart the queue. Otherwise, we have
* to plug the queue */
if(SDpnt->device_busy == 0)
blk_plug_device(q);
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment