From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754709AbbCBXKV (ORCPT ); Mon, 2 Mar 2015 18:10:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45262 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754276AbbCBXKT (ORCPT ); Mon, 2 Mar 2015 18:10:19 -0500 Date: Mon, 2 Mar 2015 15:10:18 -0800 From: Andrew Morton To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Nadia Yvette Chambers , Davidlohr Bueso , Aneesh Kumar , Joonsoo Kim Subject: Re: [RFC 1/3] hugetlbfs: add reserved mount fields to subpool structure Message-Id: <20150302151018.ce35298f22d04d6d0296e53c@linux-foundation.org> In-Reply-To: <1425077893-18366-3-git-send-email-mike.kravetz@oracle.com> References: <1425077893-18366-1-git-send-email-mike.kravetz@oracle.com> <1425077893-18366-3-git-send-email-mike.kravetz@oracle.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 27 Feb 2015 14:58:10 -0800 Mike Kravetz wrote: > Add a boolean to the subpool structure to indicate that the pages for > subpool have been reserved. The hstate pointer in the subpool is > convienient to have when it comes time to unreserve the pages. > subool_reserved() is a handy way to check if reserved and take into > account a NULL subpool. > > ... > > @@ -38,6 +40,10 @@ extern int hugetlb_max_hstate __read_mostly; > #define for_each_hstate(h) \ > for ((h) = hstates; (h) < &hstates[hugetlb_max_hstate]; (h)++) > > +static inline bool subpool_reserved(struct hugepage_subpool *spool) > +{ > + return spool && spool->reserved; > +} "subpool_reserved" is not a good identifier. > struct hugepage_subpool *hugepage_new_subpool(long nr_blocks); > void hugepage_put_subpool(struct hugepage_subpool *spool); See what they did?