From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 08/20] qemu-kvm: Replace kvm_update_interrupt_request with qemu_cpu_kick Date: Sun, 29 May 2011 19:44:16 +0300 Message-ID: <4DE277E0.3000106@redhat.com> References: <4f71a2111ae8c62ef042ec81563411789c00d7dc.1306498737.git.jan.kiszka@siemens.com> <4DE27201.3000209@redhat.com> <4DE27757.90500@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57335 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754320Ab1E2QoU (ORCPT ); Sun, 29 May 2011 12:44:20 -0400 In-Reply-To: <4DE27757.90500@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On 05/29/2011 07:41 PM, Jan Kiszka wrote: > > > > void qemu_cpu_kick(void *_env) > > { > > CPUState *env = _env; > > > > qemu_cond_broadcast(env->halt_cond); > > if (!env->thread_kicked) { > > qemu_cpu_kick_thread(env); > > env->thread_kicked = 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. What we could do is make both waiters wait for the same event. -- error compiling committee.c: too many arguments to function