From: Jan Kiszka <jan.kiszka@web.de>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: stefanha@gmail.com, Harsh Prateek Bora <harsh@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2] Introduce QemuRWLock
Date: Mon, 03 Oct 2011 19:50:12 +0200 [thread overview]
Message-ID: <4E89F5D4.3080700@web.de> (raw)
In-Reply-To: <87boty2dar.fsf@skywalker.in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]
On 2011-10-03 19:30, Aneesh Kumar K.V wrote:
> On Mon, 03 Oct 2011 14:16:09 +0200, Jan Kiszka <jan.kiszka@web.de> wrote:
> Non-text part: multipart/signed
>> On 2011-10-03 13:23, Harsh Prateek Bora wrote:
>>> SynthFS uses rwlocks, which raise the need of a generic QemuRWLock APIs.
>>> This patchset introduces the same making necessary changes to relevant code.
>>
>> Is the impact of using a plain mutex measurable with 9pfs? Usually it
>> takes very heavy write sections or highly concurrent read sections to
>> actually make a difference. Looking at the cited code, I would dare to
>> rule out the former (even more if the malloc was moved out of the
>> critical section). But I cannot assess the latter.
>>
>> If it does matter, I would vote for introducing RCU directly.
>
> I haven't done any measurements. The lock is taken in write mode
> when creating new file system object and is taken in read mode during
> lookup(walk) and readdir. Considering we allow creation of objects only
> during init, it mostly will be taken in read mode. Currently there is no
> deletion of object. We didn't want those parallel reads to be
> mutually exclusive.
That still doesn't answer if it justifies a new locking mechanism. RW
locks are rarely useful, a nightmare for RT, and widely obsolete when
RCU is available.
>
> For RCU are you suggesting to work with userspace RCU implementation at
> http://lttng.org/urcu
See http://thread.gmane.org/gmane.comp.emulators.qemu/113529. That would
also help my TCG locking optimization where I had to hack away some
ram_list changes for lock-less read access
(http://thread.gmane.org/gmane.comp.emulators.qemu/1188079).
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
prev parent reply other threads:[~2011-10-03 17:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-03 11:23 [Qemu-devel] [PATCH 0/2] Introduce QemuRWLock Harsh Prateek Bora
2011-10-03 11:23 ` [Qemu-devel] [PATCH 1/2] " Harsh Prateek Bora
2011-10-03 11:23 ` [Qemu-devel] [PATCH 2/2] Use qemu_rwlock_* interface instead of pthread_rwlock_* Harsh Prateek Bora
2011-10-03 12:16 ` [Qemu-devel] [PATCH 0/2] Introduce QemuRWLock Jan Kiszka
2011-10-03 17:30 ` Aneesh Kumar K.V
2011-10-03 17:50 ` Jan Kiszka [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=4E89F5D4.3080700@web.de \
--to=jan.kiszka@web.de \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=harsh@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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 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).