diff mbox

[04/23] Trigger exit from cpu_exec_all on pending IO events

Message ID aba91f9c5bbafc1a6143f1d3d52e5aa089bf3ee6.1296834446.git.mtosatti@redhat.com
State New
Headers show

Commit Message

Marcelo Tosatti Feb. 4, 2011, 3:47 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Except for timer events, we currently do not leave the loop over all
VCPUs if an IO event was filed. That may cause unexpected IO latencies
under !CONFIG_IOTHREAD in SMP scenarios. Fix it by setting the global
exit_request which breaks the loop.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
 cpus.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/cpus.c b/cpus.c
index ceb3a83..5dfc54e 100644
--- a/cpus.c
+++ b/cpus.c
@@ -315,6 +315,7 @@  void qemu_notify_event(void)
     if (next_cpu && env != next_cpu) {
         cpu_exit(next_cpu);
     }
+    exit_request = 1;
 }
 
 void qemu_mutex_lock_iothread(void) {}