tree d13997ee63ff3f2b69aeb788ef409b6725a07f80
parent 12b1ee0e49510d355a297e34180348a0e5139cad
author Ken Chen <[EMAIL PROTECTED]> Tue Apr 12 08:26:12 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:26:12 2005
[PATCH] use cheaper elv_queue_empty when unplug a device
In function __generic_unplug_device(), kernel can use a cheaper function
elv_queue_empty() instead of more expensive elv_next_request to find
whether the queue is empty or not. blk_run_queue can also made conditional
on whether queue's emptiness before calling request_fn().
Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
Signed-off-by: Ken Chen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
ll_rw_blk.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: drivers/block/ll_rw_blk.c
===================================================================
--- 466e6b78c5966812661b0949d26384698bf68d55/drivers/block/ll_rw_blk.c
(mode:100644 sha1:5c7eb8b7eb62b2e252438b24d9cfe168d5962ca5)
+++ d13997ee63ff3f2b69aeb788ef409b6725a07f80/drivers/block/ll_rw_blk.c
(mode:100644 sha1:b70148bb1c9fb0ced9ff8e014cae49d9628fcb4e)
@@ -1589,7 +1589,8 @@
spin_lock_irqsave(q->queue_lock, flags);
blk_remove_plug(q);
- q->request_fn(q);
+ if (!elv_queue_empty(q))
+ q->request_fn(q);
spin_unlock_irqrestore(q->queue_lock, flags);
}
EXPORT_SYMBOL(blk_run_queue);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html