]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
stubdom: optimize block io completion polling by not polling all the
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 14 Feb 2008 09:23:14 +0000 (09:23 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 14 Feb 2008 09:23:14 +0000 (09:23 +0000)
time; only when some requests have completed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
blkfront.c

index b83d5af34533fe6a35080422db10862a773c9452..1021bb018fd4145289c314a1f8787f69cde88e5c 100644 (file)
@@ -327,6 +327,11 @@ int blkfront_aio_poll(struct blkfront_dev *dev)
     struct blkif_response *rsp;
 
 moretodo:
+#ifdef HAVE_LIBC
+    files[dev->fd].read = 0;
+    mb(); /* Make sure to let the handler set read to 1 before we start looking at the ring */
+#endif
+
     rp = dev->ring.sring->rsp_prod;
     rmb(); /* Ensure we see queued responses up to 'rp'. */
     cons = dev->ring.rsp_cons;