[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] cpus: kick all vCPUs when running thread=single
From: |
Alex Bennée |
Subject: |
Re: [PATCH] cpus: kick all vCPUs when running thread=single |
Date: |
Mon, 07 Oct 2019 16:30:49 +0100 |
User-agent: |
mu4e 1.3.5; emacs 27.0.50 |
Richard Henderson <address@hidden> writes:
> On 10/6/19 9:05 AM, Paolo Bonzini wrote:
>> On 01/10/19 19:40, Alex Bennée wrote:
>>>
>>> Paolo Bonzini <address@hidden> writes:
>>>
>>>> On 01/10/19 18:04, Alex Bennée wrote:
>>>>> qemu_cpu_kick is used for a number of reasons including to indicate
>>>>> there is work to be done. However when thread=single the old
>>>>> qemu_cpu_kick_rr_cpu only advanced the vCPU to the next executing one
>>>>> which can lead to a hang in the case that:
>>>>>
>>>>> a) the kick is from outside the vCPUs (e.g. iothread)
>>>>> b) the timers are paused (i.e. iothread calling run_on_cpu)
>>>>>
>>>>> To avoid this lets split qemu_cpu_kick_rr into two functions. One for
>>>>> the timer which continues to advance to the next timeslice and another
>>>>> for all other kicks.
>>>>>
>>>>> Signed-off-by: Alex Bennée <address@hidden>
>>>>> Cc: Doug Gale <address@hidden>
>>>>> Cc: Paolo Bonzini <address@hidden>
>>>>> Cc: Peter Maydell <address@hidden>
>>>>> ---
>>>>> cpus.c | 24 ++++++++++++++++++------
>>>>> 1 file changed, 18 insertions(+), 6 deletions(-)
>>>>
>>>> Looks good to me. Single-threaded TCG is not going to have high vCPU
>>>> counts anyway.
>>>
>>> Are you going to take this via your queue?
>>
>> I wasn't, since we have had a proper TCG maintainer for a while. :)
>
> Hah. Point taken, and queued. Would you care to go on the record with
> something more than a LGTM?
Heh, I was confused because cpus.c is shown twice in MAINTAINERS as
Paolo is the main loop guy ;-)
>
>
> r~
--
Alex Bennée