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 ESMTP id 71E486B01F2 for ; Fri, 16 Apr 2010 15:13:16 -0400 (EDT) Subject: Re: [PATCH 2/6] change alloc function in pcpu_alloc_pages From: Lee Schermerhorn In-Reply-To: References: <9918f566ab0259356cded31fd1dd80da6cae0c2b.1271171877.git.minchan.kim@gmail.com> <4BC65237.5080408@kernel.org> <4BC6BE78.1030503@kernel.org> <4BC6CB30.7030308@kernel.org> <4BC6E581.1000604@kernel.org> <4BC6FBC8.9090204@kernel.org> Content-Type: text/plain Date: Fri, 16 Apr 2010 15:13:09 -0400 Message-Id: <1271445189.30360.280.camel@useless.americas.hpqcorp.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Christoph Lameter Cc: Minchan Kim , Tejun Heo , Mel Gorman , Andrew Morton , KAMEZAWA Hiroyuki , Bob Liu , linux-kernel@vger.kernel.org, linux-mm@kvack.org List-ID: On Fri, 2010-04-16 at 11:07 -0500, Christoph Lameter wrote: > On Thu, 15 Apr 2010, Minchan Kim wrote: > > > I don't want to remove alloc_pages for UMA system. > > alloc_pages is the same as alloc_pages_any_node so why have it? > > > #define alloc_pages alloc_page_sexact_node > > > > What I want to remove is just alloc_pages_node. :) > > Why remove it? If you want to get rid of -1 handling then check all the > callsites and make sure that they are not using -1. > > Also could you define a constant for -1? -1 may have various meanings. One > is the local node and the other is any node. NUMA_NO_NODE is #defined as (-1) and can be used for this purpose. '-1' has been replaced by this in many cases. It can be interpreted as "No node specified" == "any node is acceptable". But, it also has multiple meanings. E.g., in the hugetlb sysfs attribute and sysctl functions it indicates the global hstates [all nodes] vs a per node hstate. So, I suppose one could define a NUMA_ANY_NODE, to make the intention clear at the call site. I believe that all usage of -1 to mean the local node has been removed, unless I missed one. Local allocation is now indicated by a mempolicy mode flag--MPOL_F_LOCAL. It's treated as a special case of MPOL_PREFERRED. > The difference is if memory > policies are obeyed or not. Note that alloc_pages follows memory policies > whereas alloc_pages_node does not. > > Therefore > > alloc_pages() != alloc_pages_node( , -1) > > -- > 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 -- 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