Re: [PATCH 6/6] hugetlb: update hugetlb documentation for mempolicy based management.

Mel Gorman
2009-09-15T11:48:45Z

On Mon, Sep 14, 2009 at 12:15:43PM -0700, David Rientjes wrote:
> On Mon, 14 Sep 2009, Mel Gorman wrote:
>
> > > > > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> > > > > > index 83decd6..68abef0 100644
> > > > > > --- a/mm/hugetlb.c
> > > > > > +++ b/mm/hugetlb.c
> > > > > > @@ -1244,6 +1244,7 @@ static int adjust_pool_surplus(struct hstate *h, nodemask_t *nodes_allowed,
> > > > > > return ret;
> > > > > > }
> > > > > >
> > > > > > +#define NUMA_NO_NODE_OBEY_MEMPOLICY (-2)
> > >
> > > How about defining NUMA_NO_NODE_OBEY_MEMPOLICY as (NUMA_NO_NODE - 1)
> > > just to ensure that it's different. Not sure it's worth an enum at this
> > > point. NUMA_NO_NODE_OBEY_MEMPOLICY is private to hugetlb at this time.
> > >
> >
> > That seems reasonable.
> >
>
> If the nodemask allocation is moved to the sysctl handler and nodemask_t
> is passed into set_max_huge_pages() instead of nid, you don't need
> NUMA_NO_NODE_OBEY_MEMPOLICY at all, though.
>

Very likely. When V7 comes out, I'll spin a patch for that and see what
it looks like if Lee doesn't beat me to it.

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab