aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-08-20 16:58:35 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 20:30:22 -0500
commit5c6c3a6c54b23caa84fb4e046e85a461612279bb (patch)
tree7c23c2c86ca96f0a1b3dcbb86c70d5989e156710 /configure
parent9ef91a677110ec200d7b2904fc4bcae5a77329ad (diff)
raw-posix: add Linux native AIO support
Now that do have a nicer interface to work against we can add Linux native AIO support. It's an extremly thing layer just setting up an iocb for the io_submit system call in the submission path, and registering an eventfd with the qemu poll handler to do complete the iocbs directly from there. This started out based on Anthony's earlier AIO patch, but after estimated 42,000 rewrites and just as many build system changes there's not much left of it. To enable native kernel aio use the aio=native sub-command on the drive command line. I have also added an option to qemu-io to test the aio support without needing a guest. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure b/configure
index b993b656af..81272fa4ca 100755
--- a/configure
+++ b/configure
@@ -191,6 +191,7 @@ vde=""
vnc_tls=""
vnc_sasl=""
xen=""
+linux_aio=""
gprof="no"
debug_tcg="no"
@@ -523,6 +524,10 @@ for opt do
;;
--enable-mixemu) mixemu="yes"
;;
+ --disable-linux-aio) linux_aio="no"
+ ;;
+ --enable-linux-aio) linux_aio="yes"
+ ;;
--enable-io-thread) io_thread="yes"
;;
--disable-blobs) blobs="no"
@@ -674,6 +679,8 @@ echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
echo " --disable-vde disable support for vde network"
echo " --enable-vde enable support for vde network"
+echo " --disable-linux-aio disable Linux AIO support"
+echo " --enable-linux-aio enable Linux AIO support"
echo " --enable-io-thread enable IO thread"
echo " --disable-blobs disable installing provided firmware blobs"
echo " --kerneldir=PATH look for kernel includes in PATH"
@@ -1304,6 +1311,26 @@ if test "$pthread" = no; then
fi
##########################################
+# linux-aio probe
+AIOLIBS=""
+
+if test "$linux_aio" != "no" ; then
+ cat > $TMPC <<EOF
+#include <libaio.h>
+#include <sys/eventfd.h>
+int main(void) { io_setup(0, NULL); io_set_eventfd(NULL, 0); eventfd(0, 0); return 0; }
+EOF
+ if compile_prog "" "-laio" ; then
+ linux_aio=yes
+ LIBS="$LIBS -laio"
+ else
+ if test "$linux_aio" = "yes" ; then
+ feature_not_found "linux AIO"
+ fi
+ fi
+fi
+
+##########################################
# iovec probe
cat > $TMPC <<EOF
#include <sys/types.h>
@@ -1638,6 +1665,7 @@ echo "NPTL support $nptl"
echo "GUEST_BASE $guest_base"
echo "vde support $vde"
echo "IO thread $io_thread"
+echo "Linux AIO support $linux_aio"
echo "Install blobs $blobs"
echo "KVM support $kvm"
echo "fdt support $fdt"
@@ -1811,6 +1839,9 @@ fi
if test "$io_thread" = "yes" ; then
echo "CONFIG_IOTHREAD=y" >> $config_host_mak
fi
+if test "$linux_aio" = "yes" ; then
+ echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
+fi
if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_host_mak
fi