qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgalyuk <dovgaluk@ispras.ru>,
	'Pavel Dovgalyuk' <Pavel.Dovgaluk@ispras.ru>,
	qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, maria.klimushenkova@ispras.ru
Subject: Re: [Qemu-devel] [PATCH] replay: wake up vCPU when replaying
Date: Mon, 10 Sep 2018 15:04:18 +0200	[thread overview]
Message-ID: <11934dd9-cf71-8640-622e-7eaec967a3b2@redhat.com> (raw)
In-Reply-To: <004001d41777$78daa890$6a8ff9b0$@ru>

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?

Paolo

  reply	other threads:[~2018-09-10 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03  8:52 [Qemu-devel] [PATCH] replay: wake up vCPU when replaying Pavel Dovgalyuk
2018-07-09 11:24 ` Pavel Dovgalyuk
2018-09-10 13:04   ` Paolo Bonzini [this message]
2018-09-11  7:37     ` Pavel Dovgalyuk
2018-09-11 11:07       ` Paolo Bonzini

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=11934dd9-cf71-8640-622e-7eaec967a3b2@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=alex.bennee@linaro.org \
    --cc=dovgaluk@ispras.ru \
    --cc=maria.klimushenkova@ispras.ru \
    --cc=qemu-devel@nongnu.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).