WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux-2.6.18/blkback: Don't let in-flight requests d

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux-2.6.18/blkback: Don't let in-flight requests defer pending ones
From: "Jan Beulich" <JBeulich@xxxxxxxx>
Date: Mon, 10 Oct 2011 13:36:26 +0100
Cc: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Delivery-date: Mon, 10 Oct 2011 05:37:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Running RING_FINAL_CHECK_FOR_REQUESTS from make_response is a bad
idea. It means that in-flight I/O is essentially blocking continued
batches. This essentially kills throughput on frontends which unplug
(or even just notify) early and rightfully assume additional requests
will be picked up on time, not synchronously. 

Saw cache writeback going up from 45MB/s top 65MB/s for xen-blkfront
on ISCSI.

Signed-off-by: Daniel Stodden <daniel.stodden@xxxxxxxxxx>

--- a/drivers/xen/blkback/blkback.c
+++ b/drivers/xen/blkback/blkback.c
@@ -351,7 +351,7 @@ irqreturn_t blkif_be_int(int irq, void *
  * DOWNWARD CALLS -- These interface with the block-device layer proper.
  */
 
-static int do_block_io_op(blkif_t *blkif)
+static int _do_block_io_op(blkif_t *blkif)
 {
        blkif_back_rings_t *blk_rings = &blkif->blk_rings;
        blkif_request_t req;
@@ -432,6 +432,23 @@ static int do_block_io_op(blkif_t *blkif
        return more_to_do;
 }
 
+static int
+do_block_io_op(blkif_t *blkif)
+{
+       blkif_back_rings_t *blk_rings = &blkif->blk_rings;
+       int more_to_do;
+
+       do {
+               more_to_do = _do_block_io_op(blkif);
+               if (more_to_do)
+                       break;
+
+               RING_FINAL_CHECK_FOR_REQUESTS(&blk_rings->common, more_to_do);
+       } while (more_to_do);
+
+       return more_to_do;
+}
+
 static void dispatch_rw_block_io(blkif_t *blkif,
                                 blkif_request_t *req,
                                 pending_req_t *pending_req)
@@ -641,7 +658,6 @@ static void make_response(blkif_t *blkif
        blkif_response_t  resp;
        unsigned long     flags;
        blkif_back_rings_t *blk_rings = &blkif->blk_rings;
-       int more_to_do = 0;
        int notify;
 
        resp.id        = id;
@@ -668,22 +684,8 @@ static void make_response(blkif_t *blkif
        }
        blk_rings->common.rsp_prod_pvt++;
        RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&blk_rings->common, notify);
-       if (blk_rings->common.rsp_prod_pvt == blk_rings->common.req_cons) {
-               /*
-                * Tail check for pending requests. Allows frontend to avoid
-                * notifications if requests are already in flight (lower
-                * overheads and promotes batching).
-                */
-               RING_FINAL_CHECK_FOR_REQUESTS(&blk_rings->common, more_to_do);
-
-       } else if (RING_HAS_UNCONSUMED_REQUESTS(&blk_rings->common)) {
-               more_to_do = 1;
-       }
-
        spin_unlock_irqrestore(&blkif->blk_ring_lock, flags);
 
-       if (more_to_do)
-               blkif_notify_work(blkif);
        if (notify)
                notify_remote_via_irq(blkif->irq);
 }




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux-2.6.18/blkback: Don't let in-flight requests defer pending ones, Jan Beulich <=