From 20457bb88157c63901c0b1b7219bf084d4bac2a6 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 14 Feb 2008 09:23:14 +0000 Subject: stubdom: optimize block io completion polling by not polling all the time; only when some requests have completed. Signed-off-by: Samuel Thibault --- extras/mini-os/blkfront.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'extras/mini-os/blkfront.c') 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; -- cgit v1.2.3