Skip to contentSkip to conversation

Switch to thread pool from posix-aio

Qemu-devel Anthony Liguori 2 participants 6 messages Dec 12, 2008

lore
Share & tools
lore
#0 lore raw

I've just committed the thread pool patch I posted a few days ago (plus the suggested cleanups).

Please test this especially if you're using a very old glibc or a non-Linux Unix. Also pay attention for any performance differences. I don't think any will be noticable unless you're doing very heavy IO and I expect it will only improve things.

If in the past you've been forced to use --disable-aio, please try again without --disable-aio and let me know if it now works.

Regards,

Anthony Liguori

#1 lore raw
Quoted 7 lines · Anthony Liguori

I've just committed the thread pool patch I posted a few days ago (plus the suggested cleanups).

Please test this especially if you're using a very old glibc or a non-Linux
Unix. Also pay attention for any performance differences. I don't think any will be noticable unless you're doing very heavy IO and I expect it will only improve things.

Compilation is broken on Debian stable, you need librt for timer_create, clock_gettime etc.

#2 lore raw
Quoted 5 lines · Blue Swirl
Quoted 3 lines · Anthony Liguori

I've just committed the thread pool patch I posted a few days ago (plus the suggested cleanups).

Quoted 9 lines
Quoted 5 lines

Please test this especially if you're using a very old glibc or a non-Linux
Unix. Also pay attention for any performance differences. I don't think any will be noticable unless you're doing very heavy IO and I expect it will only improve things.

Compilation is broken on Debian stable, you need librt for timer_create, clock_gettime etc.

I'll add a proper configure test for that. I guess that means that --disable-aio was broken on Debian unstable too.

Regards,

Anthony Liguori

#3 lore raw
In reply to Blue Swirl
Quoted 5 lines · Blue Swirl
Quoted 3 lines · Anthony Liguori

I've just committed the thread pool patch I posted a few days ago (plus the suggested cleanups).

Quoted 9 lines
Quoted 5 lines

Please test this especially if you're using a very old glibc or a non-Linux
Unix. Also pay attention for any performance differences. I don't think any will be noticable unless you're doing very heavy IO and I expect it will only improve things.

Compilation is broken on Debian stable, you need librt for timer_create, clock_gettime etc.

Does this patch fix your problem?

Regards,

Anthony Liguori

configure +20 -0
index d1f0c04..e997a32 100755
@@ -972,6 +972,26 @@ if [ -x "`which texi2html 2>/dev/null`" ] && \
   build_docs="yes"
 fi
 
+##########################################
+# Do we need librt
+cat > $TMPC <<EOF
+#include <signal.h>
+#include <time.h>
+int main(void) { clockid_t id; return clock_gettime(id, NULL); }
+EOF
+
+rt=no
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+  :
+elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lrt 2> /dev/null ; then
+  rt=yes
+fi
+
+if test "$rt" = "yes" ; then
+  # Hack, we should have a general purpose LIBS for this sort of thing
+  AIOLIBS="$AIOLIBS -lrt"
+fi
+
 if test "$mingw32" = "yes" ; then
   if test -z "$prefix" ; then
       prefix="c:\\\\Program Files\\\\Qemu"
#4 lore raw
Quoted 19 lines · Anthony Liguori
Quoted 4 lines · Blue Swirl
Quoted 1 line · Anthony Liguori

I've just committed the thread pool patch I posted a few days ago (plus

the

Quoted 3 lines
Quoted 3 lines

suggested cleanups).

Please test this especially if you're using a very old glibc or a

non-Linux

Quoted 1 line
Quoted 1 line

Unix. Also pay attention for any performance differences. I don't

think

Quoted 1 line
Quoted 1 line

any will be noticable unless you're doing very heavy IO and I expect it

will

Quoted 4 lines
Quoted 3 lines

only improve things.

Quoted 6 lines
Quoted 4 lines

Compilation is broken on Debian stable, you need librt for timer_create, clock_gettime etc.

Does this patch fix your problem?

Yes, it does.

#5 lore raw
Quoted 6 lines · Blue Swirl
Quoted 1 line · Anthony Liguori

Yes, it does.

Thanks. I committed a work-around to get the build going again. I'll try to do a proper cleanup soon.

Regards,

Anthony Liguori