On 02/16/2011 11:04 AM, Jan Kiszka wrote:
On 2011-02-16 10:57, Paolo Bonzini wrote:
On 02/16/2011 10:46 AM, Jan Kiszka wrote:
What should this be good for? The iothread already kicks the vcpu if it
wants to acquire the contended global mutex.
Assuming the VCPU is in the timedwait that Marcelo changed, the global
mutex is free and the iothread will not kick the VCPU.
Then why should it kick it at all?
To make it notice something changed in all_cpu_threads_idle---but that's
wrong, it should have been kicked in cpu_interrupt.
If we change the halt condition, we should not kick the vcpus but only
signal the condition variable. Actually, I've a patch queued that skips
pointless qemu_thread_signal in qemu_cpu_kick for TCG.
Yes, I was kicking just because that's the wrapper that is used to
signal the condition variable---just like I was kicking in my patches to
eliminate timedwait.
So, perhaps the correct fix is to kick the cpu in cpu_interrupt, and all
I wrote about timeouts and timers is wrong. My patch would band-aid it.
That's my strong suspect. We really need to understand what goes wrong.
I agree on both counts.
Paolo