From: Paolo Bonzini <pbonzini@redhat.com>
To: Gaurav Sharma <gauravs.2010@gmail.com>,
QEMU-DEVEL <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Doubts regarding parallelism on KVM, IO threads
Date: Thu, 3 Mar 2016 09:47:35 +0100 [thread overview]
Message-ID: <56D7FA27.7020207@redhat.com> (raw)
In-Reply-To: <CABiB5K7K+p8LXxj_uk5jDjf30L-eUHsxaNwAcKCnAXxFiusk3g@mail.gmail.com>
On 03/03/2016 07:09, Gaurav Sharma wrote:
> Hi was trying to do some digging for multi core scenarios both with and
> without KVM.
>
> In short i have some devices and a user application that does some r/w
> operations on those devices.
>
> As per my understanding, in case binary translation using TCG is
> invoked, we only create a single Qemuthread for all vcpu's. In case of
> KVM we have a Qemuthread for each vcpu as TCG is bypassed in this case.
>
>
> [Test scenario]
> Lets say i have devices dev1 and dev2. Test application for dev1 is
> executed on core0 and dev2 on core1.
> For device dev1, for testing purposes i specified some sleep whenever a
> read comes.
> In case KVM is enabled, whenever the sleep is hit my whole VM freezes.
>
> 1. Are are devices emulated in a separate single thread ?
No, but device emulation and I/O all run behind the same mutex
(affectionately called "big QEMU lock"). See qemu_mutex_lock_iothread
and qemu_mutex_unlock_iothread.
Paolo
> 2. How and where in the code do we do a switch between CPU thread and
> IOthread ?
prev parent reply other threads:[~2016-03-03 9:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 6:09 [Qemu-devel] Doubts regarding parallelism on KVM, IO threads Gaurav Sharma
2016-03-03 8:47 ` Paolo Bonzini [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=56D7FA27.7020207@redhat.com \
--to=pbonzini@redhat.com \
--cc=gauravs.2010@gmail.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.