From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBDdx-0007rp-8C for qemu-devel@nongnu.org; Fri, 12 Dec 2008 14:25:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBDdv-0007qm-Jb for qemu-devel@nongnu.org; Fri, 12 Dec 2008 14:25:44 -0500 Received: from [199.232.76.173] (port=34502 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBDdv-0007qi-Ej for qemu-devel@nongnu.org; Fri, 12 Dec 2008 14:25:43 -0500 Received: from an-out-0708.google.com ([209.85.132.240]:8110) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBDdv-0001cM-1e for qemu-devel@nongnu.org; Fri, 12 Dec 2008 14:25:43 -0500 Received: by an-out-0708.google.com with SMTP id c38so769229ana.37 for ; Fri, 12 Dec 2008 11:25:41 -0800 (PST) Message-ID: <4942BAB1.7000208@codemonkey.ws> Date: Fri, 12 Dec 2008 13:25:37 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Switch to thread pool from posix-aio References: <494294B5.3030200@codemonkey.ws> In-Reply-To: Content-Type: multipart/mixed; boundary="------------010207090605050806040401" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------010207090605050806040401 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Blue Swirl wrote: > On 12/12/08, Anthony Liguori wrote: > >> 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. > Does this patch fix your problem? Regards, Anthony Liguori --------------010207090605050806040401 Content-Type: text/x-patch; name="rt-configure.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rt-configure.patch" diff --git a/configure b/configure index d1f0c04..e997a32 100755 --- a/configure +++ b/configure @@ -972,6 +972,26 @@ if [ -x "`which texi2html 2>/dev/null`" ] && \ build_docs="yes" fi +########################################## +# Do we need librt +cat > $TMPC < +#include +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" --------------010207090605050806040401--