All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blkback: Fix block I/O latency issue
@ 2011-05-02  7:04 Vincent, Pradeep
  2011-05-02  8:13 ` Jan Beulich
  2011-05-28 20:12 ` [RE-PATCH] " Daniel Stodden
  0 siblings, 2 replies; 33+ messages in thread
From: Vincent, Pradeep @ 2011-05-02  7:04 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1274 bytes --]

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@amazon.com>

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 #1.2: Type: text/html, Size: 2329 bytes --]

[-- Attachment #2: blkback-bugfix-reqevent-assignment.patch --]
[-- Type: application/octet-stream, Size: 662 bytes --]

Signed-off-by: Pradeep Vincent <pradeepv@amazon.com>

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 #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2011-06-28 13:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02  7:04 [PATCH] blkback: Fix block I/O latency issue Vincent, Pradeep
2011-05-02  8:13 ` Jan Beulich
2011-05-03  1:10   ` Vincent, Pradeep
2011-05-03 14:55     ` Konrad Rzeszutek Wilk
2011-05-03 17:16       ` Vincent, Pradeep
2011-05-03 17:51         ` Daniel Stodden
2011-05-03 23:41           ` Vincent, Pradeep
2011-05-03 17:52     ` Daniel Stodden
2011-05-04  1:54       ` Vincent, Pradeep
2011-05-09 20:24         ` Konrad Rzeszutek Wilk
2011-05-13  0:40           ` Vincent, Pradeep
2011-05-13  2:51             ` Konrad Rzeszutek Wilk
2011-05-16 15:22               ` Konrad Rzeszutek Wilk
2011-05-20  6:12                 ` Vincent, Pradeep
2011-05-24 16:02                   ` Konrad Rzeszutek Wilk
2011-05-24 22:40                     ` Vincent, Pradeep
2011-05-28 20:12 ` [RE-PATCH] " Daniel Stodden
2011-05-28 20:21   ` [PATCH] xen/blkback: Don't let in-flight requests defer pending ones Daniel Stodden
2011-05-29  8:09     ` Vincent, Pradeep
2011-05-29 11:34       ` Daniel Stodden
2011-06-01  8:02         ` Vincent, Pradeep
2011-06-01  8:24           ` Jan Beulich
2011-06-01 17:49           ` Daniel Stodden
2011-06-01 18:07             ` Daniel Stodden
2011-06-27 14:03             ` Konrad Rzeszutek Wilk
2011-06-27 18:42               ` Daniel Stodden
2011-06-27 19:13                 ` Konrad Rzeszutek Wilk
2011-06-28  0:31                   ` Daniel Stodden
2011-06-28 13:19                     ` Konrad Rzeszutek Wilk
2011-05-31 13:44       ` Fix wrong help message for parameter nestedhvm Dong, Eddie
2011-05-31 16:23         ` Ian Campbell
2011-05-31 16:08     ` [PATCH] xen/blkback: Don't let in-flight requests defer pending ones Konrad Rzeszutek Wilk
2011-05-31 16:30       ` Daniel Stodden

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.