diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-02-14 09:23:14 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-02-14 09:23:14 +0000 |
commit | 20457bb88157c63901c0b1b7219bf084d4bac2a6 (patch) | |
tree | f14e2c33d8f21c696924b1d98305664a7d93f63b /extras/mini-os/blkfront.c | |
parent | fdbcfd71bbc84b9e44bc0c79489b750109a380d0 (diff) | |
download | xen-20457bb88157c63901c0b1b7219bf084d4bac2a6.tar.gz xen-20457bb88157c63901c0b1b7219bf084d4bac2a6.tar.bz2 xen-20457bb88157c63901c0b1b7219bf084d4bac2a6.zip |
stubdom: optimize block io completion polling by not polling all the
time; only when some requests have completed.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/blkfront.c')
-rw-r--r-- | extras/mini-os/blkfront.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extras/mini-os/blkfront.c b/extras/mini-os/blkfront.c index b83d5af345..1021bb018f 100644 --- a/extras/mini-os/blkfront.c +++ b/extras/mini-os/blkfront.c @@ -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; |