Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752384Ab0DSRjB (ORCPT ); Mon, 19 Apr 2010 13:39:01 -0400 Received: from nlpi129.sbcis.sbc.com ([207.115.36.143]:32998 "EHLO nlpi129.prodigy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550Ab0DSRjA (ORCPT ); Mon, 19 Apr 2010 13:39:00 -0400 Date: Mon, 19 Apr 2010 12:38:05 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@router.home To: Minchan Kim cc: Tejun Heo , Mel Gorman , Andrew Morton , KAMEZAWA Hiroyuki , Bob Liu , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/6] change alloc function in pcpu_alloc_pages In-Reply-To: <1271606079.2100.159.camel@barrios-desktop> Message-ID: 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> <1271606079.2100.159.camel@barrios-desktop> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1302 Lines: 31 On Mon, 19 Apr 2010, Minchan Kim wrote: > My concern is following as. > > alloc_pages_node means any node but it has nid argument. > Why should user of alloc_pages who want to get page from any node pass > nid argument? It's rather awkward. Its not awkward but an optimization. The page can be placed on any node but the user would prefer a certain node. Most of the NUMA things are there for optimization purposes and not for correctness. If you must have an allocation on certain nodes for correctness (like SLAB) then GFP_THISNODE is used. > Some of user misunderstood it and used alloc_pages_node instead of > alloc_pages_exact_node although he already know exact _NID_. > Of course, it's not a BUG since if nid >= 0 it works well. > > But I want to remove such multiple meaning to clear intention of user. Its not clear to me that this renaming etc helps. You must use GFP_THISNODE if allocation must occur from a certain node. alloc_pages_exact_node results in more confusion because it does suggest that fallback to other nodes is not allowed. -- 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/