[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] blkback: Fix block I/O latency issue


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Vincent, Pradeep" <pradeepv@xxxxxxxxxx>
  • Date: Mon, 2 May 2011 00:04:09 -0700
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Delivery-date: Mon, 02 May 2011 00:05:07 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcwIlyNAOMu/f7TRQdyiiS+36rLa4g==
  • Thread-topic: [PATCH] blkback: Fix block I/O latency issue

In blkback driver, after I/O requests are submitted to Dom-0 block I/O subsystem, blkback goes to 'sleep' effectively without letting blkfront know about it (req_event isn't set appropriately). Hence blkfront doesn't notify blkback when it submits a new I/O thus delaying the 'dispatch' of the new I/O to Dom-0 block I/O subsystem. The new I/O is dispatched as soon as one of the previous I/Os completes.

As a result of this issue, the block I/O latency performance is degraded for some workloads on Xen guests using blkfront-blkback stack.

The following change addresses this issue:


Signed-off-by: Pradeep Vincent <pradeepv@xxxxxxxxxx>

diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c
--- a/drivers/xen/blkback/blkback.c
+++ b/drivers/xen/blkback/blkback.c
@@ -383,6 +383,12 @@ static int do_block_io_op(blkif_t *blkif)
  cond_resched();
  }
 
+ /* If blkback might go to sleep (i.e. more_to_do == 0) then we better
+   let blkfront know about it (by setting req_event appropriately) so that
+   blkfront will bother to wake us up (via interrupt) when it submits a 
+   new I/O */
+        if (!more_to_do)
+                 RING_FINAL_CHECK_FOR_REQUESTS(&blk_rings->common, more_to_do);
  return more_to_do;
 }
 



Attachment: blkback-bugfix-reqevent-assignment.patch
Description: blkback-bugfix-reqevent-assignment.patch

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.