From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with SMTP id 0236860021D for ; Fri, 2 Oct 2009 18:53:30 -0400 (EDT) Received: from localhost (smtp.ultrahosting.com [127.0.0.1]) by smtp.ultrahosting.com (Postfix) with ESMTP id 86A2582C79D for ; Fri, 2 Oct 2009 18:57:14 -0400 (EDT) Received: from smtp.ultrahosting.com ([74.213.174.253]) by localhost (smtp.ultrahosting.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aqSpyELzbOgW for ; Fri, 2 Oct 2009 18:57:14 -0400 (EDT) Received: from gentwo.org (unknown [74.213.171.31]) by smtp.ultrahosting.com (Postfix) with ESMTP id CAD1F82C7EF for ; Fri, 2 Oct 2009 18:57:09 -0400 (EDT) Date: Fri, 2 Oct 2009 18:48:28 -0400 (EDT) From: Christoph Lameter Subject: Re: [patch] nodemask: make NODEMASK_ALLOC more general In-Reply-To: Message-ID: References: <20091001165721.32248.14861.sendpatchset@localhost.localdomain> <20091001165832.32248.32725.sendpatchset@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: David Rientjes Cc: 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: 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. 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? 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. -- 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