qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Amit Shah <amit.shah@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, KVM List <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] Re: Slowdowns comparing qemu-kvm.git to qemu.git: vcpu/thread scheduling differences
Date: Tue, 9 Feb 2010 19:12:55 +0000	[thread overview]
Message-ID: <20100209191255.GA946@shareable.org> (raw)
In-Reply-To: <4B7073FA.8000905@codemonkey.ws>

Anthony Liguori wrote:
> No, basically, the problem will boil down to, the IO thread is 
> select()'d waiting for an event to occur.  However, you've done 
> something in the VCPU thread that requires the IO thread to run it's 
> main loop.  You need to use qemu_notify_event() to force the IO thread 
> to break out of select().
> 
> Debugging these problems are very difficult and the complexity here is 
> the main reason the IO thread still hasn't been enabled by default in 
> qemu.git.

It is difficult.  One approach to debugging them, in general, is to
have a special debugging mode where the select() loop wakes up
repeatedly at high speed and checks all the conditions it's supposed
to to be waiting for that _should_ have triggered a wakeup, and if any
of them are asserted for two timed wakeups (or some sufficient duration,
checked by gettimeofday), emit a bug message because it probably is one.

I don't know if that could be applied in qemu's event loop.

-- Jamie

      reply	other threads:[~2010-02-09 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 13:46 [Qemu-devel] Slowdowns comparing qemu-kvm.git to qemu.git: vcpu/thread scheduling differences Amit Shah
2010-02-08 14:57 ` [Qemu-devel] " Anthony Liguori
2010-02-08 17:35   ` Amit Shah
2010-02-08 20:28     ` Anthony Liguori
2010-02-09 19:12       ` Jamie Lokier [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=20100209191255.GA946@shareable.org \
    --to=jamie@shareable.org \
    --cc=amit.shah@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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 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).