From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>, qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org
Subject: Re: [PATCH] replay: don't wait in run_on_cpu
Date: Mon, 29 Mar 2021 11:42:02 +0200 [thread overview]
Message-ID: <e18262ca-c41b-2257-323a-ff22ba462ed5@redhat.com> (raw)
In-Reply-To: <161700514781.1141125.8890164582302771524.stgit@pasha-ThinkPad-X280>
On 29/03/21 10:05, Pavel Dovgalyuk wrote:
> @@ -136,7 +137,13 @@ void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data,
> {
> struct qemu_work_item wi;
>
> - if (qemu_cpu_is_self(cpu)) {
> + if (qemu_cpu_is_self(cpu)
> + /*
> + * vCPU thread is waiting when replay mutex is locked
> + * and the task is not exclusive, the function may be called
> + * without other synchronization.
> + */
> + || (replay_mode != REPLAY_MODE_NONE && replay_mutex_locked())) {
> func(cpu, data);
> return;
> }
Is the "or" saying that the execution is using the lockstep mode? If
so, can you put it in a separate function so that it's more
self-explanatory and check if it should be used elsewhere?
Thanks,
Paolo
next prev parent reply other threads:[~2021-03-29 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 8:05 [PATCH] replay: don't wait in run_on_cpu Pavel Dovgalyuk
2021-03-29 9:42 ` Paolo Bonzini [this message]
2021-03-29 10:55 ` Pavel Dovgalyuk
2021-03-29 12:11 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2021-03-11 7:14 Pavel Dovgalyuk
2021-03-15 5:59 ` Pavel Dovgalyuk
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=e18262ca-c41b-2257-323a-ff22ba462ed5@redhat.com \
--to=pbonzini@redhat.com \
--cc=pavel.dovgalyuk@ispras.ru \
--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).