From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch uq/master 2/4] qemu: kvm specific wait_io_event Date: Thu, 18 Feb 2010 11:58:39 -0200 Message-ID: <20100218135839.GA7147@amt.cnet> References: <20100217221439.351652889@redhat.com> <20100217221701.041682707@redhat.com> <4B7CFA6F.3080801@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:17607 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755402Ab0BRN6r (ORCPT ); Thu, 18 Feb 2010 08:58:47 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1IDwlGc003504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Feb 2010 08:58:47 -0500 Content-Disposition: inline In-Reply-To: <4B7CFA6F.3080801@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Feb 18, 2010 at 10:29:35AM +0200, Avi Kivity wrote: > >+static void qemu_kvm_wait_io_event(CPUState *env) > >+{ > >+ while (!cpu_has_work(env)) > >+ qemu_cond_timedwait(env->halt_cond,&qemu_global_mutex, 1000); > >+ > >+ qemu_wait_io_event_common(env); > > } > > Shouldn't kvm specific code be in kvm-all.c? The context is in vl.c, so don't see much gain. > > > > static int qemu_cpu_exec(CPUState *env); > >@@ -3448,7 +3462,7 @@ static void *kvm_cpu_thread_fn(void *arg > > while (1) { > > if (cpu_can_run(env)) > > qemu_cpu_exec(env); > >- qemu_wait_io_event(env); > >+ qemu_kvm_wait_io_event(env); > > } > > > > return NULL; > > Well, kvm_cpu_thread_fn() apparently isn't.