qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Harsh Bora <harsh@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, aneesh.kumar@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 2/2] 9p-synth: use mutex on read-side
Date: Sat, 18 Aug 2012 20:46:47 +0200	[thread overview]
Message-ID: <502FE317.3020607@redhat.com> (raw)
In-Reply-To: <502951BC.1090400@linux.vnet.ibm.com>

Il 13/08/2012 21:13, Harsh Bora ha scritto:
>>
> 
> Hi Paolo,
> 
> The rcu_read_[un]lock() macros were added as no-ops (based on your
> inputs on #qemu) to replace reader-writer locks with RCU based locking
> as suggested while proposing QemuRWLock API for RW locks (See
> http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg00192.html).

The rwlock was also premature optimization IMHO.

> v9fs_synth_mutex was actually a pthread_rwlock_t earlier.
> I am not sure if reader lock would be better than having a plain mutex
> for readers as well.
> 
> Aneesh, inputs ?
> 
> Also, if we are going forward with this change, we may also want to
> remove definition of QLIST_INSERT_HEAD_RCU, since the code being remove
> below is the only consumer of that macro.

It's in a library file, so I don't mind leaving it in.  I think liu ping
fan's patches were using it.

Paolo

      reply	other threads:[~2012-08-18 18:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 11:55 [Qemu-devel] [PATCH 0/2] 9p-synth: remove poor-man RCU Paolo Bonzini
2012-08-08 11:55 ` [Qemu-devel] [PATCH 1/2] 9p-synth: fix read-side critical sections Paolo Bonzini
2012-08-13 18:47   ` Harsh Bora
2012-08-08 11:55 ` [Qemu-devel] [PATCH 2/2] 9p-synth: use mutex on read-side Paolo Bonzini
2012-08-13 19:13   ` Harsh Bora
2012-08-18 18:46     ` 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=502FE317.3020607@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=harsh@linux.vnet.ibm.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).