From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH] netfilter: use per-CPU r**ursive lock {XV} Date: Tue, 28 Apr 2009 09:41:08 +0200 Message-ID: <1240904468.7620.70.camel@twins> References: <49F22465.80305@gmail.com> <20090425133052.4cb711f5@nehalam> <49F4A6E3.7080102@cosmosbay.com> <20090426185646.GB29238@Krystal> <20090426145746.1184aeba@nehalam> <1240854297.7620.65.camel@twins> <20090427113010.5e3f1700@nehalam> <20090427185423.GC23862@elte.hu> <20090427120658.35a858bb@nehalam> <20090427203616.GB3836@ioremap.net> <20090427144054.1fb9b7a6@nehalam> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Stephen Hemminger , Evgeniy Polyakov , Ingo Molnar , Mathieu Desnoyers , Eric Dumazet , David Miller , Jarek Poplawski , Paul Mackerras , paulmck@linux.vnet.ibm.com, kaber@trash.net, jeff.chua.linux@gmail.com, laijs@cn.fujitsu.com, jengelh@medozas.de, r000n@r000n.net, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, benh@kernel.crashing.org To: Linus Torvalds Return-path: In-Reply-To: Sender: netdev-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org On Mon, 2009-04-27 at 16:32 -0700, Linus Torvalds wrote: > > On Mon, 27 Apr 2009, Linus Torvalds wrote: > > > > I left the commentary about "readers" and "writers", because in many > > ways it's correct, and what the code actually does is very much to > > emulate a reader-writer lock. I put quotes around the uses in the > > comments to high-light that it largely _acts_ as a reader-writer lock. > > Btw, I think it was Paul who pointed out that technically it's probably > better to call them "local" and "global" lockers instead of "readers" and > "writers". exclusive vs non-exclusive is what the literature would call them in most cases I think. > That also probably clarifies the rules on when you use one over the other > (ie reading off all the statistics is a "global" operation, as is > obviously replacing the tables). > > Of course, "readers" and "writers" is something most Linux lock people are > more used to. Or "brlock" for the old-timers, but that involves a heavy > dose of bad taste. The new use is much nicer, especially since it never > takes the global lock on _all_ cpu's (which was really a killer in so > many ways). > > Linus