lkml.org 
[lkml]   [2017]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/4] mm, hugetlb: unclutter hugetlb allocation layers
On Wed 14-06-17 15:42:58, Michal Hocko wrote:
> On Wed 14-06-17 15:18:26, Vlastimil Babka wrote:
> > On 06/13/2017 11:00 AM, Michal Hocko wrote:
> [...]
> > > @@ -1717,13 +1640,22 @@ struct page *alloc_huge_page_node(struct hstate *h, int nid)
> > > page = dequeue_huge_page_node(h, nid);
> > > spin_unlock(&hugetlb_lock);
> > >
> > > - if (!page)
> > > - page = __alloc_buddy_huge_page_no_mpol(h, nid);
> > > + if (!page) {
> > > + nodemask_t nmask;
> > > +
> > > + if (nid != NUMA_NO_NODE) {
> > > + nmask = NODE_MASK_NONE;
> > > + node_set(nid, nmask);
> >
> > TBH I don't like this hack too much, and would rather see __GFP_THISNODE
> > involved, which picks a different (short) zonelist. Also it's allocating
> > nodemask on stack, which we generally avoid? Although the callers
> > currently seem to be shallow.
>
> Fair enough. That would require pulling gfp mask handling up the call
> chain. This on top of this patch + refreshes for other patches later in
> the series as they will conflict now?

I've rebase the attempts/hugetlb-zonelists branch for an easier review.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-06-14 16:05    [W:0.407 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site