Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191Ab0DURGZ (ORCPT ); Wed, 21 Apr 2010 13:06:25 -0400 Received: from mail-iw0-f178.google.com ([209.85.223.178]:42226 "EHLO mail-iw0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753708Ab0DURGX convert rfc822-to-8bit (ORCPT ); Wed, 21 Apr 2010 13:06:23 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=r20Ruvag1QtgaxOe2w79iSCRgfKeba+vbn27AznspF8zjA+t+WzoZ8UhN6sFvKxUAT 2N0ZedZFlvRgpn3o/a83WfqV7aCJfMKW+uOkNP0YKbfa9k0jnpJEXuG1U4WGLogdXxUF OWwYrLoGIpw8UF6SNPosbtqX9E5LX+Je58Nn4= 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 To: Christoph Lameter Cc: Mel Gorman , Tejun Heo , Andrew Morton , KAMEZAWA Hiroyuki , Bob Liu , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1283 Lines: 41 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.  For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org > -- 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/