Re: [PATCH 1/6] mm: add kmalloc_array_node and kcalloc_node
From: Michal Hocko
Date: Wed Sep 27 2017 - 05:16:28 EST
On Wed 27-09-17 04:03:01, Cristopher Lameter wrote:
> On Wed, 27 Sep 2017, Michal Hocko wrote:
>
> > > Introduce a combination of the two above cases to have a NUMA-node aware
> > > version of kmalloc_array() and kcalloc().
> >
> > Yes, this is helpful. I am just wondering why we cannot have
> > kmalloc_array to call kmalloc_array_node with the local node as a
> > parameter. Maybe some sort of an optimization?
>
> Well the regular kmalloc without node is supposed to follow memory
> policies. An explicit mentioning of a node requires allocation from that
> node and will override memory allocation policies.
I see. Thanks for the clarification
--
Michal Hocko
SUSE Labs