qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RESEND][PATCH] Replace qemu_system_cond with VCPU stop


From: Avi Kivity
Subject: Re: [Qemu-devel] [RESEND][PATCH] Replace qemu_system_cond with VCPU stop mechanism
Date: Mon, 22 Aug 2011 19:18:39 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

On 08/22/2011 06:46 PM, Jan Kiszka wrote:
We can express the VCPU thread wakeup with the stop mechanism, saving
both qemu_system_ready and the qemu_system_cond. For KVM threads, we can
just enter the main loop as long as the thread is stopped. The central
TCG thread is better held back before the loop as there can be side
effects of the services called even when all CPUs are stopped.

Creating VCPUs in stopped state will also be required for proper CPU
hotplugging support.


-    /* and wait for machine initialization */
-    while (!qemu_system_ready) {
-        qemu_cond_wait(&qemu_system_cond,&qemu_global_mutex);
+    /* wait for initial kick-off after machine start */
+    while (!first_cpu->stopped) {
+        qemu_cond_wait(tcg_halt_cond,&qemu_global_mutex);
      }

Seems inverted - do we want to wait until first_cpu is stopped, or while first_cpu is stopped?

Do we want to process run_on_cpu() events after the machine is created but before a cpu is started (if starting with -S)?

--
error compiling committee.c: too many arguments to function




reply via email to

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