From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper Date: Sun, 29 May 2011 21:54:50 +0200 Message-ID: <20110529195450.GE13539@elte.hu> References: <20110527103657.GA25748@elte.hu> <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> 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: "Paul E. McKenney" Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:45312 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944Ab1E2TzD (ORCPT ); Sun, 29 May 2011 15:55:03 -0400 Content-Disposition: inline In-Reply-To: <20110529155102.GA6893@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: * 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 ... Thanks, Ingo