Subject: Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

From: Michal Hocko <[email-masked]>
Date: Mon, 24 Feb 2020 09:58:12 +0100

On Sat 22-02-20 03:38:11, Cristopher Lameter wrote:
> On Tue, 18 Feb 2020, Michal Hocko wrote:
> 
> > Anyway, I do not think it is expected that kmalloc_node just blows up
> > on those nodes. The page allocator simply falls back to the closest
> > node. Something for kmalloc maintainers I believe.
> 
> That is the case for an unconstrained allocation. kmalloc_node means that
> you want memory from that node. And If there is no such node then it is an
> error.

Hmm, nasty. Is there any reason why kmalloc_node behaves differently
from the page allocator?

> > A short summary. kmalloc_node blows up when trying to allocate from a
> > memory less node.
> 
> Use kmalloc instead? And set a memory allocation policy?

The current code (memcg_expand_one_shrinker_map resp. memcg_alloc_shrinker_maps)
already use kvmalloc. Kirill's patch wanted to make those data structure
on the respective node and kvmalloc_node sounded like the right thing to
do. It comes as a surprise that the kernel simply blows up on a memory
less node rather than falling back to a close node gracefully. I suspect
this already happens when the target node is out of memory, right?

How would a memory allocation policy help in this case btw.?

-- 
Michal Hocko
SUSE Labs