From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18553 invoked by alias); 9 Jan 2007 22:41:27 -0000 Received: (qmail 18546 invoked by uid 22791); 9 Jan 2007 22:41:27 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from gprs189-60.eurotel.cz (HELO amd.ucw.cz) (160.218.189.60) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Jan 2007 22:41:22 +0000 Received: by amd.ucw.cz (Postfix, from userid 8) id 64AB42BCB6; Tue, 9 Jan 2007 23:41:00 +0100 (CET) Date: Tue, 09 Jan 2007 22:41:00 -0000 From: Pavel Machek To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, Andrew Morton , Ingo Molnar , Greg Kroah-Hartman , Christoph Hellwig , ltt-dev@shafik.org, systemtap@sources.redhat.com, Douglas Niehaus , "Martin J. Bligh" , Thomas Gleixner Subject: Re: [PATCH] local_t : Documentation Message-ID: <20070109224100.GB6555@elf.ucw.cz> References: <20061221001545.GP28643@Krystal> <20061223093358.GF3960@ucw.cz> <20070109031446.GA29426@Krystal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070109031446.GA29426@Krystal> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.11+cvs20060126 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q1/txt/msg00028.txt.bz2 Hi! > > > These patches extend and standardise local_t operations on each architectures, > > > allowing a rich set of atomic operations to be done on per-cpu data with > > > minimal performance impact. On some architectures, there seems to be no > > > difference between the SMP and UP operation (same memory barriers, same > > > LOCking), local.h simply includes asm-generic/local.h, which removes duplicated > > > code. > > > > Could you provide some Documentation/? Knowing when local_t can be > > used is kind-of important. > > Hi Pavel, > > Thanks for this appropriate comment. I totally agree that there is a need for > documentation about how local_t variables should be used. Here is the patch > that adds Documentation/local_ops.txt. Comments are welcome. AFAICT this fails to mention... Is local_t as big as int? As big as long? Or perhaps smaller because high bits may be needed for locking? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html