qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Doug Gale <doug16k@gmail.com>,
	qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH] cpus: kick all vCPUs when running thread=single
Date: Mon, 07 Oct 2019 16:30:49 +0100	[thread overview]
Message-ID: <87blusk1xy.fsf@linaro.org> (raw)
In-Reply-To: <a475e640-1739-24df-f873-d54abb891c35@linaro.org>


Richard Henderson <richard.henderson@linaro.org> writes:

> On 10/6/19 9:05 AM, Paolo Bonzini wrote:
>> On 01/10/19 19:40, Alex Bennée wrote:
>>>
>>> Paolo Bonzini <pbonzini@redhat.com> 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 <alex.bennee@linaro.org>
>>>>> Cc: Doug Gale <doug16k@gmail.com>
>>>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>>>> Cc: Peter Maydell <peter.maydell@linaro.org>
>>>>> ---
>>>>>  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


      parent reply	other threads:[~2019-10-07 15:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 16:04 [PATCH] cpus: kick all vCPUs when running thread=single Alex Bennée
2019-10-01 16:38 ` Paolo Bonzini
2019-10-01 17:40   ` Alex Bennée
2019-10-06 16:05     ` Paolo Bonzini
2019-10-07 14:00       ` Richard Henderson
2019-10-07 14:56         ` Paolo Bonzini
2019-10-07 15:30         ` Alex Bennée [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blusk1xy.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=doug16k@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).