From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] qemu-kvm: Fix test for I/O thread Date: Sat, 19 Jul 2008 09:07:40 +0200 Message-ID: <488192BC.7000807@web.de> References: <48804FE7.4090507@siemens.com> <48819143.1010702@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig641DF01130F146F669920DDE" Cc: kvm-devel To: Avi Kivity Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:47431 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbYGSHHs (ORCPT ); Sat, 19 Jul 2008 03:07:48 -0400 In-Reply-To: <48819143.1010702@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig641DF01130F146F669920DDE Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > Jan Kiszka wrote: >> Looks to me like this was rather intended. But given that >> 4e8b8a6d92c5ece048e65be3a3980d24f065b32b claims to actually fix a bug = in >> its original broken form, please have a careful look. >> >> Signed-off-by: Jan Kiszka >> >> diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c >> index 431e26d..c36f60f 100644 >> --- a/qemu/qemu-kvm.c >> +++ b/qemu/qemu-kvm.c >> @@ -89,7 +89,7 @@ static void qemu_cond_wait(pthread_cond_t *cond) >> pthread_cond_timedwait(cond, &qemu_mutex, &ts); >> /* If we're the I/O thread, some other thread may be waiting for = aio >> * completion */ >> - if (!vcpu_info) >> + if (!env) >> qemu_aio_poll(); >> cpu_single_env =3D env; >> } >> =20 >=20 > Aren't the two lines equivalent? vcpu_info is a thread-local-storage > variable, and is unset for the iothread. >=20 Then you probably wanted to type 'vcpu', don't you? :) However, I would stick with what the function already uses, ie. 'env'. Jan --------------enig641DF01130F146F669920DDE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkiBksIACgkQniDOoMHTA+lF/wCcDLWSI4Bibb1wlJ0WUWR9ilLL CY8An1mW+6nLmD30gdnEVsdq0/C3C1zu =1lNc -----END PGP SIGNATURE----- --------------enig641DF01130F146F669920DDE--