qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Jan Kiszka <jan.kiszka@web.de>,
	Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Cc: stefanha@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2] Introduce QemuRWLock
Date: Mon, 03 Oct 2011 23:00:20 +0530	[thread overview]
Message-ID: <87boty2dar.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <4E89A789.8080302@web.de>

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.

For RCU are you suggesting to work with userspace RCU implementation at 
http://lttng.org/urcu

-aneesh

  reply	other threads:[~2011-10-03 17:31 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 [this message]
2011-10-03 17:50     ` Jan Kiszka

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=87boty2dar.fsf@skywalker.in.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=harsh@linux.vnet.ibm.com \
    --cc=jan.kiszka@web.de \
    --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).