All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: [Qemu-devel] [RESEND][PATCH] Replace qemu_system_cond with VCPU stop mechanism
Date: Mon, 22 Aug 2011 19:18:39 +0300	[thread overview]
Message-ID: <4E52815F.6010607@redhat.com> (raw)
In-Reply-To: <4E5279F3.7070103@siemens.com>

On 08/22/2011 06:46 PM, Jan Kiszka wrote:
> We can express the VCPU thread wakeup with the stop mechanism, saving
> both qemu_system_ready and the qemu_system_cond. For KVM threads, we can
> just enter the main loop as long as the thread is stopped. The central
> TCG thread is better held back before the loop as there can be side
> effects of the services called even when all CPUs are stopped.
>
> Creating VCPUs in stopped state will also be required for proper CPU
> hotplugging support.
>
>
> -    /* and wait for machine initialization */
> -    while (!qemu_system_ready) {
> -        qemu_cond_wait(&qemu_system_cond,&qemu_global_mutex);
> +    /* wait for initial kick-off after machine start */
> +    while (!first_cpu->stopped) {
> +        qemu_cond_wait(tcg_halt_cond,&qemu_global_mutex);
>       }

Seems inverted - do we want to wait until first_cpu is stopped, or while 
first_cpu is stopped?

Do we want to process run_on_cpu() events after the machine is created 
but before a cpu is started (if starting with -S)?

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-08-22 16:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 15:46 [Qemu-devel] [RESEND][PATCH] Replace qemu_system_cond with VCPU stop mechanism Jan Kiszka
2011-08-22 16:18 ` Avi Kivity [this message]
2011-08-22 16:35   ` [Qemu-devel] [PATCH v3] " Jan Kiszka
2011-08-22 20:18     ` Anthony Liguori

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=4E52815F.6010607@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=pbonzini@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.