From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with SMTP id 0D1C86B01F8 for ; Wed, 21 Apr 2010 13:06:46 -0400 (EDT) Received: by iwn40 with SMTP id 40so5167629iwn.1 for ; Wed, 21 Apr 2010 10:06:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <4BC6CB30.7030308@kernel.org> <4BC6FBC8.9090204@kernel.org> <1271606079.2100.159.camel@barrios-desktop> <4BCCD8BD.1020307@kernel.org> <20100420150522.GG19264@csn.ul.ie> Date: Thu, 22 Apr 2010 02:06:22 +0900 Message-ID: Subject: Re: [PATCH 2/6] change alloc function in pcpu_alloc_pages From: Minchan Kim Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org To: Christoph Lameter Cc: Mel Gorman , Tejun Heo , Andrew Morton , KAMEZAWA Hiroyuki , Bob Liu , linux-kernel@vger.kernel.org, linux-mm@kvack.org List-ID: On Wed, Apr 21, 2010 at 11:15 PM, Christoph Lameter wrote: > On Tue, 20 Apr 2010, Mel Gorman wrote: > >> alloc_pages_exact_node() avoids a branch in a hot path that is checking = for >> something the caller already knows. That's the reason it exists. > > We can avoid alloc_pages_exact_node() by making all callers of > alloc_pages_node() never use -1. -1 is ambiguous and only rarely will a > caller pass that to alloc_pages_node(). That's very reasonable to me. Then, we can remove alloc_pages_exact_node and nid < 0 check in alloc_pages_node at the same time. Mel. Could you agree? Firstly Tejun suggested this but I didn't got the point. Sorry for bothering you. Okay. I will dive into this approach. Thanks for careful review, All. > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. =C2=A0For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org > --=20 Kind regards, Minchan Kim -- 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