From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper Date: Sun, 29 May 2011 20:12:58 -0700 Message-ID: <20110530031258.GO2668@linux.vnet.ibm.com> References: <1306511560.3217.23.camel@lappy> <20110527171040.GC4356@elte.hu> <1306527578.3217.26.camel@lappy> <20110528152408.GA27104@elte.hu> <1306611908.3282.7.camel@lappy> <4DE1EC05.3040001@redhat.com> <20110529071948.GA20686@elte.hu> <20110529153130.GG2668@linux.vnet.ibm.com> <20110529155102.GA6893@linux.vnet.ibm.com> <20110529195450.GE13539@elte.hu> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Sasha Levin , Mathieu Desnoyers , Pekka Enberg , john@jfloren.net, kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com To: Ingo Molnar Return-path: Received: from e7.ny.us.ibm.com ([32.97.182.137]:34922 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611Ab1E3DNE (ORCPT ); Sun, 29 May 2011 23:13:04 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4U2nRoT021556 for ; Sun, 29 May 2011 22:49:27 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4U3D37t121454 for ; Sun, 29 May 2011 23:13:03 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4U3D29M002189 for ; Sun, 29 May 2011 23:13:03 -0400 Content-Disposition: inline In-Reply-To: <20110529195450.GE13539@elte.hu> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, May 29, 2011 at 09:54:50PM +0200, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > > > And the other reason that you want to mark the readers is for debug > > purposes. Murphy being who he is, you will some day need to check > > for someone calling the "OK to update" function while they are > > acting as a reader. > > Correct. In one of the previous mails i suggested a debug mode that > switches it all to pthread rwlocks. > > We do not want to lose the identify of what the read paths are: this > could grow into a BKL-alike nasty-to-fix assumption over a couple of > years! Then if someone finds a usecase that intensifies the frequency > of one of the key writepaths, we'll be in trouble ... "BKR" -- Big Kernel Reader! ;-) Thanx, Paul