[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] replay: wake up vCPU when replaying
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] replay: wake up vCPU when replaying |
Date: |
Tue, 11 Sep 2018 13:07:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 11/09/2018 09:37, Pavel Dovgalyuk wrote:
>> From: Paolo Bonzini [mailto:address@hidden
>> On 09/07/2018 13:24, Pavel Dovgalyuk wrote:
>>> static void qemu_tcg_rr_wait_io_event(CPUState *cpu)
>>> {
>>> while (all_cpu_threads_idle()) {
>>> stop_tcg_kick_timer();
>>> qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex);
>>> }
>>>
>>> start_tcg_kick_timer();
>>>
>>> qemu_wait_io_event_common(cpu);
>>> }
>>>
>>> all_cpu_threads_idle() returns true when there is no queued work.
>>> But between this call and qemu_cond_wait() iothread may add queued work
>>> and the vCPU thread will sleep infinitely.
>>
>> Maybe queue_work_on_cpu is called outside BQL?
>
> I don't remember now.
> However, rr series includes the better version of that patch.
Good, thanks.
Paolo