From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper Date: Sun, 29 May 2011 19:22:59 +0300 Message-ID: <1306686179.14564.2.camel@lappy> References: <20110526230923.GB15983@Krystal> <1306491547.3217.9.camel@lappy> <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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Ingo Molnar , Avi Kivity , Mathieu Desnoyers , Pekka Enberg , john@jfloren.net, kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com To: paulmck@linux.vnet.ibm.com Return-path: Received: from mail-ww0-f42.google.com ([74.125.82.42]:49601 "EHLO mail-ww0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754579Ab1E2QX2 (ORCPT ); Sun, 29 May 2011 12:23:28 -0400 Received: by wwk4 with SMTP id 4so995131wwk.1 for ; Sun, 29 May 2011 09:23:27 -0700 (PDT) In-Reply-To: <20110529153130.GG2668@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 2011-05-29 at 08:31 -0700, Paul E. McKenney wrote: > This is very important even if no write path ever becomes more than > just occasional. If you don't mark the read paths like Ingo suggests, > your one-year-from-now self will be very annoyed at you, as the code > will be quite difficult to understand. And anyone else trying to > read your code will be even more annoyed. ;-) I very much agree with that. Working on the code I'm trying to separate between the pause/unpause of the guest, and a 'brlock' lock which allows for very cheap reads and very expensive writes. -- Sasha.