From: Jan Kiszka <jan.kiszka@siemens.com>
To: Liu Ping Fan <qemulist@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread
Date: Thu, 21 Jun 2012 17:23:13 +0200 [thread overview]
Message-ID: <4FE33C61.9000509@siemens.com> (raw)
In-Reply-To: <1340290158-11036-1-git-send-email-qemulist@gmail.com>
On 2012-06-21 16:49, Liu Ping Fan wrote:
> Nowadays, we use qemu_mutex_lock_iothread()/qemu_mutex_unlock_iothread() to
> protect the race to access the emulated dev launched by vcpu threads & iothread.
>
> But this lock is too big. We can break it down.
> These patches separate the CPUArchState's protection from the other devices, so we
> can have a per-cpu lock for each CPUArchState, not the big lock any longer.
Anything that reduces lock dependencies is generally welcome. But can
you specify in more details what you gain, and under which conditions?
I'm skeptical if this is the right area to start. With the in-kernel
irqchip enabled, no CPUArchState field is touched during normal
operations (unless I missed something subtle in the past). At the same
time, this locking is unfortunately fairly complex and invasive, so not
"cheap" to integrate.
IMO more interesting is breaking out some I/O path, e.g. from a NIC to a
network backend, and get this processed in a separate thread without
touching the BQL (Big QEMU Lock). I've experimental patches for this
here, but they need rebasing and polishing.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2012-06-21 15:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1340290158-11036-1-git-send-email-qemulist@gmail.com>
[not found] ` <1340290158-11036-3-git-send-email-qemulist@gmail.com>
2012-06-21 15:02 ` [Qemu-devel] [PATCH 2/2] kvm: use per-cpu lock to free vcpu thread out of the big lock Jan Kiszka
2012-06-22 20:06 ` Anthony Liguori
2012-06-23 9:32 ` liu ping fan
2012-06-24 14:09 ` liu ping fan
2012-06-21 15:23 ` Jan Kiszka [this message]
2012-06-22 10:24 ` [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread liu ping fan
2012-06-22 10:37 ` Jan Kiszka
2012-06-22 20:11 ` Anthony Liguori
2012-06-22 21:14 ` Jan Kiszka
2012-06-22 21:44 ` Anthony Liguori
2012-06-22 22:27 ` Jan Kiszka
2012-06-22 22:56 ` Anthony Liguori
2012-06-23 9:10 ` Jan Kiszka
[not found] ` <1340290158-11036-2-git-send-email-qemulist@gmail.com>
2012-06-22 20:01 ` [Qemu-devel] [PATCH 1/2] CPUArchState: introduce per-cpu lock Anthony Liguori
2012-06-21 15:06 [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread Liu Ping Fan
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=4FE33C61.9000509@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=qemulist@gmail.com \
/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.