Skip to contentSkip to conversation

Add fallback code to blktap for missing poll-on-aio support

PATCH RESEND New Mark McLoughlin 1 participant 1 message Jun 18, 2007

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 Add fallback code to blktap for missing poll-on-aio support

Hey,
As Stephen explains in this mail:

http://lists.xensource.com/archives/html/xen-devel/2006-10/msg00331.html

blktap requires a xen specific kernel AIO ABI which has been vetoed by
upstream in favour of another approach. Rather than include this ABI, Fedora has been carrying a patch which makes tap:aio use a thread to poll for aio events and notify the main thread via a pipe.

The upstream approach of allowing io_getevents() poll normal file
descriptors via epoll is still progressing:

http://lkml.org/lkml/2007/1/3/16

but when that does make it upstream, blktap will require significant
re-working to use that approach.

In the meantime, here's a patch which uses the poll-in-a-thread
approach only if AIO poll support isn't available. It also hides the details behind a simple abstraction and makes both tap:aio and tap:qcow use it.

Built and tested with latest xen-unstable.

Cheers,
Mark.

tools/blktap/drivers/Makefile +1 -0
Index: xen-unstable.hg/tools/blktap/drivers/Makefile
===================================================================
@@ -35,6 +35,7 @@ BLK-OBJS  += block-vmdk.o
 BLK-OBJS  += block-ram.o
 BLK-OBJS  += block-qcow.o
 BLK-OBJS  += aes.o
+BLK-OBJS  += tapaio.o
 
 all: $(IBIN) qcow-util
 
tools/blktap/drivers/block-aio.c +20 -27

111 lines not on this page · raw message

tools/blktap/drivers/block-qcow.c +22 -24

123 lines not on this page · raw message

tools/blktap/drivers/tapaio.c new file +164 -0

164 lines not on this page · raw message

tools/blktap/drivers/tapaio.h new file +58 -0

58 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel