qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 20/21] kvm: Do not use qemu_fair_mutex


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH v3 20/21] kvm: Do not use qemu_fair_mutex
Date: Tue, 4 Jan 2011 09:32:32 +0100

From: Jan Kiszka <address@hidden>

The imbalance in the hold time of qemu_global_mutex only exists in TCG
mode. In contrast to TCG VCPUs, KVM drops the global lock during guest
execution. We already avoid touching the fairness lock from the
IO-thread in KVM mode, so also stop using it from the VCPU threads.

Signed-off-by: Jan Kiszka <address@hidden>
---
 cpus.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/cpus.c b/cpus.c
index 2847dcf..db74530 100644
--- a/cpus.c
+++ b/cpus.c
@@ -740,9 +740,7 @@ static sigset_t block_io_signals(void)
 void qemu_mutex_lock_iothread(void)
 {
     if (kvm_enabled()) {
-        qemu_mutex_lock(&qemu_fair_mutex);
         qemu_mutex_lock(&qemu_global_mutex);
-        qemu_mutex_unlock(&qemu_fair_mutex);
     } else {
         qemu_mutex_lock(&qemu_fair_mutex);
         if (qemu_mutex_trylock(&qemu_global_mutex)) {
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]