From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 51DEB6007DB for ; Wed, 2 Dec 2009 11:29:25 -0500 (EST) Subject: Re: [PATCH/RFC 1/6] numa: Use Generic Per-cpu Variables for numa_node_id() From: Lee Schermerhorn In-Reply-To: <200912010043.36115.arnd@arndb.de> References: <20091113211714.15074.29078.sendpatchset@localhost.localdomain> <1259612920.4663.156.camel@useless.americas.hpqcorp.net> <200912010043.36115.arnd@arndb.de> Content-Type: text/plain Date: Wed, 02 Dec 2009 11:29:21 -0500 Message-Id: <1259771361.4088.25.camel@useless.americas.hpqcorp.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Arnd Bergmann Cc: Christoph Lameter , linux-arch@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, Mel Gorman , Nick Piggin , David Rientjes , eric.whitney@hp.com, Tejun Heo List-ID: On Tue, 2009-12-01 at 00:43 +0100, Arnd Bergmann wrote: > On Monday 30 November 2009, Lee Schermerhorn wrote: > > Looking at other asm/foo.h and asm-generic/foo.h relationships, I see > > that some define the generic version of the api in the asm-generic > > header if the arch asm header hasn't already defined it. asm/topology.h > > is an instance of this. It includes asm-generic/topology.h after > > defining arch specific versions of some of the api. > > This works alright, but if you expect every architecture to include the > asm-generic version, you might just as well take that choice away from > the architecture and put the common code into the linux/foo.h file, > which you can still override with definitions in asm/foo.h. > > Most of the asm-generic headers are just mostly generic, and get included > by some but not all architectures, the others defining the whole contents > of the asm-generic file themselves in a different way. > > So if you e.g. want ia64 to do everything itself and all other architectures to > share some or all parts of asm-generic/topology, your approach is right, > otherwise just leave the code in some file in include/linux/. Actually, I just wanted to make the generic definitions of this_cpu_{read|write}() visible to topology.h when building on ia64 w/o the circular header dependencies. Willy pointed out a way to do this by un-inlining __alloc_percpu(). Perhaps this is the way to go. Tejun is looking at the patches. Lee -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org