Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760167AbZD1HmK (ORCPT ); Tue, 28 Apr 2009 03:42:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753531AbZD1Hlw (ORCPT ); Tue, 28 Apr 2009 03:41:52 -0400 Received: from casper.infradead.org ([85.118.1.10]:42923 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752703AbZD1Hlu (ORCPT ); Tue, 28 Apr 2009 03:41:50 -0400 Subject: Re: [PATCH] netfilter: use per-CPU r**ursive lock {XV} From: Peter Zijlstra To: Linus Torvalds 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 In-Reply-To: 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> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 28 Apr 2009 09:41:08 +0200 Message-Id: <1240904468.7620.70.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 32 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/