Messages in this thread | | | Date | Mon, 02 Mar 2015 17:20:51 -0800 | From | Mike Kravetz <> | Subject | Re: [RFC 1/3] hugetlbfs: add reserved mount fields to subpool structure |
| |
On 03/02/2015 03:10 PM, Andrew Morton wrote: > On Fri, 27 Feb 2015 14:58:10 -0800 Mike Kravetz <mike.kravetz@oracle.com> 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?
Got it. Thanks. hugepage_subpool_reserved
-- Mike Kravetz
| |