Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753915Ab0DRPyr (ORCPT ); Sun, 18 Apr 2010 11:54:47 -0400 Received: from mail-yx0-f191.google.com ([209.85.210.191]:55015 "EHLO mail-yx0-f191.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752584Ab0DRPyq (ORCPT ); Sun, 18 Apr 2010 11:54:46 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=WOQK0lI5/2JWmfBPcA6/d/dNnP7xeP00ogQRMZZxU4byKnc1Gd9XYxgJ5aIhADCU+c z5U7gfq7zdTgMALLPRKWf5XZzexuLiT7hPu/GMB0JqGJCgUa4H7NV6S0O6nYSXWXq/e6 kYpD7lnRwczJUWwdxPHGMNN82n+vXP9TVEUZo= Subject: Re: [PATCH 2/6] change alloc function in pcpu_alloc_pages From: Minchan Kim To: Christoph Lameter Cc: Tejun Heo , Mel Gorman , Andrew Morton , KAMEZAWA Hiroyuki , Bob Liu , linux-kernel@vger.kernel.org, linux-mm@kvack.org 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; charset="UTF-8" Date: Mon, 19 Apr 2010 00:54:39 +0900 Message-ID: <1271606079.2100.159.camel@barrios-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1963 Lines: 65 Hi, Christoph. 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? I don't want to force using '_node' postfix on UMA users. Maybe they don't care getting page from any node and event don't need to know about _NODE_. > > > #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 alloc_pages_node have multiple meaning as you said. So some of users misuses that API. I want to clear intention of user. > callsites and make sure that they are not using -1. Sure. I must do it before any progressing. > > Also could you define a constant for -1? -1 may have various meanings. One > is the local node and the other is any node. 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) > Yes, now it's totally different. On UMA, It's any node but on NUMA, local node. 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. 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. -- Kind regards, Minchan Kim -- 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/