From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 08/20] qemu-kvm: Replace kvm_update_interrupt_request with qemu_cpu_kick Date: Sun, 29 May 2011 19:55:26 +0200 Message-ID: <4DE2888E.7040101@web.de> References: <4f71a2111ae8c62ef042ec81563411789c00d7dc.1306498737.git.jan.kiszka@siemens.com> <4DE27201.3000209@redhat.com> <4DE27757.90500@web.de> <4DE277E0.3000106@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigACEAC6FE113D6340306588C2" Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:44008 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752761Ab1E2Rzb (ORCPT ); Sun, 29 May 2011 13:55:31 -0400 In-Reply-To: <4DE277E0.3000106@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigACEAC6FE113D6340306588C2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-05-29 18:44, Avi Kivity wrote: > On 05/29/2011 07:41 PM, Jan Kiszka wrote: >> > >> > void qemu_cpu_kick(void *_env) >> > { >> > CPUState *env =3D _env; >> > >> > qemu_cond_broadcast(env->halt_cond); >> > if (!env->thread_kicked) { >> > qemu_cpu_kick_thread(env); >> > env->thread_kicked =3D true; >> > } >> > } >> > >> > Seems to have redundancies - we're both signalling a condition >> variable >> > and sending a signal. >> > >> >> The target may block on the halt condition or run in guest mode. I don= 't >> think we can (and should) try to find out which wakeup call is >> sufficient. >=20 > What we could do is make both waiters wait for the same event. That may only work if we are able to switch halt_cond to a signal-based mechanism. As usual, a portability issue. I don't think there is much to win /wrt performance (cond_broadcast is fast). So the question is if code complexity could actually benefit from this. Jan --------------enigACEAC6FE113D6340306588C2 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk3iiJEACgkQitSsb3rl5xRqzgCdFbzoIyG5zbwrFVXlwSMxnrwV mLUAoLlQBPGMUcUUniXuUPK5ov+pAL44 =MyFS -----END PGP SIGNATURE----- --------------enigACEAC6FE113D6340306588C2--