lkml.org 
[lkml]   [2020]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Phishing Risk] [External] Re: [PATCH v2] mm/hugetlb: add mempolicy check in the reservation routine
On Fri 24-07-20 21:56:29, Muchun Song wrote:
> On Fri, Jul 24, 2020 at 7:34 PM Michal Hocko <mhocko@kernel.org> wrote:
[...]
> > I believe you can simplify this and use a similar pattern as the page
> > allocator. Something like
> >
> > for_each_node_mask(node, mpol_allowed) {
> > if (node_isset(node, &cpuset_current_mems_allowed))
> > nr += array[node];
> > }
> >
> > There shouldn't be any need to allocate a potentially large nodemask on
> > the stack.
>
> An unsigned long can satisfy 64 nodes. So I think that nodemask is using
> little stack memory. Right?

CONFIG_NODES_SHIFT=10

is not something surprising. E.g. SLES is using that default for a long
time because those kernels tend to run on very large machines.

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2020-07-24 16:27    [W:0.039 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site