Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753134Ab2E0UIe (ORCPT ); Sun, 27 May 2012 16:08:34 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:40610 "EHLO e23smtp07.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160Ab2E0UIa (ORCPT ); Sun, 27 May 2012 16:08:30 -0400 Date: Mon, 28 May 2012 01:37:57 +0530 From: "Aneesh Kumar K.V" To: David Rientjes Cc: linux-mm@kvack.org, mgorman@suse.de, kamezawa.hiroyu@jp.fujitsu.com, dhillf@gmail.com, aarcange@redhat.com, mhocko@suse.cz, akpm@linux-foundation.org, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH -V6 03/14] hugetlbfs: Add an inline helper for finding hstate index Message-ID: <20120527200757.GA7631@skywalker.linux.vnet.ibm.com> References: <1334573091-18602-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1334573091-18602-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) x-cbid: 12052710-0260-0000-0000-0000013BB9EB Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1296 Lines: 36 On Thu, May 24, 2012 at 02:22:27PM -0700, David Rientjes wrote: > On Mon, 16 Apr 2012, Aneesh Kumar K.V wrote: > > > From: "Aneesh Kumar K.V" > > > > Add an inline helper and use it in the code. > > > > Acked-by: Michal Hocko > > Reviewed-by: KAMEZAWA Hiroyuki > > Signed-off-by: Aneesh Kumar K.V > > I like the helper function, but you missed using it in > hugetlb_init(). > Will do this as an add on patc on top diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 4b90dd5..58eead5 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1891,7 +1891,7 @@ static int __init hugetlb_init(void) if (!size_to_hstate(default_hstate_size)) hugetlb_add_hstate(HUGETLB_PAGE_ORDER); } - default_hstate_idx = size_to_hstate(default_hstate_size) - hstates; + default_hstate_idx = hstate_index(size_to_hstate(default_hstate_size)); if (default_hstate_max_huge_pages) default_hstate.max_huge_pages = default_hstate_max_huge_pages; -- 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/