[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] 9p-synth: use mutex on read-side
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] 9p-synth: use mutex on read-side |
Date: |
Sat, 18 Aug 2012 20:46:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
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