From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2o2w-0001eZ-E8 for qemu-devel@nongnu.org; Sat, 18 Aug 2012 14:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2o2v-0000ey-Ae for qemu-devel@nongnu.org; Sat, 18 Aug 2012 14:46:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2o2v-0000eu-2d for qemu-devel@nongnu.org; Sat, 18 Aug 2012 14:46:53 -0400 Message-ID: <502FE317.3020607@redhat.com> Date: Sat, 18 Aug 2012 20:46:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1344426944-7638-1-git-send-email-pbonzini@redhat.com> <1344426944-7638-3-git-send-email-pbonzini@redhat.com> <502951BC.1090400@linux.vnet.ibm.com> In-Reply-To: <502951BC.1090400@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] 9p-synth: use mutex on read-side List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Harsh Bora Cc: qemu-devel@nongnu.org, aneesh.kumar@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