Re: [patch -mm] mm, page_alloc: warn_alloc nodemask is NULL when cpusets are disabled

From: Michal Hocko
Date: Thu Jan 19 2017 - 03:57:17 EST


On Thu 19-01-17 08:29:45, Vlastimil Babka wrote:
> On 01/18/2017 10:51 PM, David Rientjes wrote:
> > The patch "mm, page_alloc: warn_alloc print nodemask" implicitly sets the
> > allocation nodemask to cpuset_current_mems_allowed when there is no
> > effective mempolicy. cpuset_current_mems_allowed is only effective when
> > cpusets are enabled, which is also printed by warn_alloc(), so setting
> > the nodemask to cpuset_current_mems_allowed is redundant and prevents
> > debugging issues where ac->nodemask is not set properly in the page
> > allocator.
> >
> > This provides better debugging output since
> > cpuset_print_current_mems_allowed() is already provided.
> >
> > Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
>
> Yes, with my current cpuset vs mempolicy debugging experience, this is
> more useful (except how both nodemask and mems_allowed can change under
> us, so what we print here is not necessarily the same that what
> get_page_from_freelist() has seen, but that's another thing...).
>
> But I would suggest you change the oom killer's dump_header() the same
> way than warn_alloc().

Yes please

--
Michal Hocko
SUSE Labs