From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with SMTP id 6933760021D for ; Fri, 2 Oct 2009 21:03:30 -0400 (EDT) Received: from m3.gw.fujitsu.co.jp ([10.0.50.73]) by fgwmail5.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n9313WIg007980 for (envelope-from kamezawa.hiroyu@jp.fujitsu.com); Sat, 3 Oct 2009 10:03:32 +0900 Received: from smail (m3 [127.0.0.1]) by outgoing.m3.gw.fujitsu.co.jp (Postfix) with ESMTP id E1AC445DE4F for ; Sat, 3 Oct 2009 10:03:31 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by m3.gw.fujitsu.co.jp (Postfix) with ESMTP id C1D6C45DE4D for ; Sat, 3 Oct 2009 10:03:31 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id AA15E1DB8038 for ; Sat, 3 Oct 2009 10:03:31 +0900 (JST) Received: from ml13.s.css.fujitsu.com (ml13.s.css.fujitsu.com [10.249.87.103]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 612F01DB803B for ; Sat, 3 Oct 2009 10:03:31 +0900 (JST) Message-ID: In-Reply-To: References: <20091001165721.32248.14861.sendpatchset@localhost.localdomain> <20091001165832.32248.32725.sendpatchset@localhost.localdomain> Date: Sat, 3 Oct 2009 10:03:30 +0900 (JST) Subject: Re: [patch] nodemask: make NODEMASK_ALLOC more general From: "KAMEZAWA Hiroyuki" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-2022-jp Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org To: Christoph Lameter Cc: David Rientjes , Andrew Morton , linux-mm@kvack.org, linux-numa@vger.kernel.org, Mel Gorman , Randy Dunlap , Nishanth Aravamudan , Adam Litke , Andy Whitcroft , eric.whitney@hp.com, Lee Schermerhorn , KAMEZAWA Hiroyuki List-ID: Christoph Lameter wrote: > On Fri, 2 Oct 2009, David Rientjes wrote: > >> NODEMASK_ALLOC(x, m) assumes x is a type of struct, which is >> unnecessary. >> It's perfectly reasonable to use this macro to allocate a nodemask_t, >> which is anonymous, either dynamically or on the stack depending on >> NODES_SHIFT. > > There is currently only one user of NODEMASK_ALLOC which is > NODEMASK_SCRATCH. > yes. > Can we generalize the functionality here? The macro is basically choosing > between a slab allocation or a stack allocation depending on the > configured system size. > > NUMA_COND__ALLOC(, , > ) > > or so? > sounds reasonable. It seems cpumask has ifdef CONFIG_CPUMASK_OFFSTACK > Its likely that one way want to allocate other structures on the stack > that may get too big if large systems need to be supported. > maybe using the same style as cpumask will be reasonable. Thanks, -Kame -- 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