aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-12-04 18:20:41 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-12-04 18:20:41 +0100
commit1e4b462e21ccdf69ef19152374b28a4f5df03701 (patch)
treea5782c72240b52729ef37beff52368dae295d982
parent55f8d24f80a222b0494b8545eece615a03d45062 (diff)
downloadxen-1e4b462e21ccdf69ef19152374b28a4f5df03701.tar.gz
xen-1e4b462e21ccdf69ef19152374b28a4f5df03701.tar.bz2
xen-1e4b462e21ccdf69ef19152374b28a4f5df03701.zip
Pull requests from blkfront into blkback a bit more
aggressively, to keep the scheduling pipeline filled. Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
index fcc6c12de4..d9aee65e69 100644
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
@@ -493,12 +493,12 @@ static void make_response(blkif_t *blkif, unsigned long id,
blk_ring->rsp_prod_pvt++;
RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(blk_ring, notify);
- /*
- * Tail check for pending requests. Allows frontend to avoid
- * notifications if requests are already in flight (lower overheads
- * and promotes batching).
- */
if (blk_ring->rsp_prod_pvt == blk_ring->req_cons) {
+ /*
+ * Tail check for pending requests. Allows frontend to avoid
+ * notifications if requests are already in flight (lower
+ * overheads and promotes batching).
+ */
int more_to_do;
RING_FINAL_CHECK_FOR_REQUESTS(blk_ring, more_to_do);
if (more_to_do) {
@@ -506,6 +506,12 @@ static void make_response(blkif_t *blkif, unsigned long id,
maybe_trigger_blkio_schedule();
}
}
+ else if (!__on_blkdev_list(blkif)
+ && RING_HAS_UNCONSUMED_REQUESTS(blk_ring)) {
+ /* Keep pulling requests as they become available... */
+ add_to_blkdev_list_tail(blkif);
+ maybe_trigger_blkio_schedule();
+ }
spin_unlock_irqrestore(&blkif->blk_ring_lock, flags);