On Wed 22-08-18 11:52:50, Andrea Arcangeli wrote: > On Wed, Aug 22, 2018 at 11:02:14AM +0200, Michal Hocko wrote: [...] > > I still have to digest the __GFP_THISNODE thing but I _think_ that the > > alloc_pages_vma code is just trying to be overly clever and > > __GFP_THISNODE is not a good fit for it. > > My option 2 did just that, it removed __GFP_THISNODE but only for > MADV_HUGEPAGE and in general whenever reclaim was activated by > __GFP_DIRECT_RECLAIM. That is also signal that the user really wants > THP so then it's less bad to prefer THP over NUMA locality. > > For the default which is tuned for short lived allocation, preferring > local memory is most certainly better win for short lived allocation > where THP can't help much, this is why I didn't remove __GFP_THISNODE > from the default defrag policy. Yes I agree. -- Michal Hocko SUSE Labs