From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsdOM-00068l-Nq for qemu-devel@nongnu.org; Fri, 28 Jun 2013 14:27:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsdOJ-0000Qs-VD for qemu-devel@nongnu.org; Fri, 28 Jun 2013 14:27:30 -0400 Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]:50355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsdOJ-0000QR-LN for qemu-devel@nongnu.org; Fri, 28 Jun 2013 14:27:27 -0400 Received: by mail-ee0-f50.google.com with SMTP id d49so1205854eek.9 for ; Fri, 28 Jun 2013 11:27:27 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id o5sm12035344eef.5.2013.06.28.11.27.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Jun 2013 11:27:25 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 28 Jun 2013 20:26:34 +0200 Message-Id: <1372444009-11544-16-git-send-email-pbonzini@redhat.com> In-Reply-To: <1372444009-11544-1-git-send-email-pbonzini@redhat.com> References: <1372444009-11544-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 15/30] cpus: report RCU quiescent states List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org CPU threads have extended quiescent states while relinquishing control to the accelerator (except TCG). Signed-off-by: Paolo Bonzini --- cpus.c | 3 +++ kvm-all.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cpus.c b/cpus.c index c8bc8ad..4b5cb8d 100644 --- a/cpus.c +++ b/cpus.c @@ -37,6 +37,7 @@ #include "sysemu/qtest.h" #include "qemu/main-loop.h" #include "qemu/bitmap.h" +#include "qemu/rcu.h" #ifndef _WIN32 #include "qemu/compatfd.h" @@ -793,6 +794,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg) while (1) { cpu_single_env = NULL; qemu_mutex_unlock_iothread(); + rcu_thread_offline(); do { int sig; r = sigwait(&waitset, &sig); @@ -801,6 +803,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg) perror("sigwait"); exit(1); } + rcu_thread_online(); qemu_mutex_lock_iothread(); cpu_single_env = env; qemu_wait_io_event_common(cpu); diff --git a/kvm-all.c b/kvm-all.c index 91aa7ff..547abe3 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -33,6 +33,7 @@ #include "exec/memory.h" #include "exec/address-spaces.h" #include "qemu/event_notifier.h" +#include "qemu/rcu.h" #include "trace.h" /* This check must be after config-host.h is included */ @@ -1644,7 +1645,9 @@ int kvm_cpu_exec(CPUArchState *env) } qemu_mutex_unlock_iothread(); + rcu_thread_offline(); run_ret = kvm_vcpu_ioctl(cpu, KVM_RUN, 0); + rcu_thread_online(); qemu_mutex_lock_iothread(); kvm_arch_post_run(cpu, run); -- 1.8.1.4