From: Michal Hocko <mhocko@kernel.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: mike.kravetz@oracle.com,
Andrew Morton <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
mgorman@suse.de, walken@google.com,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Jianchao Guo <guojianchao@bytedance.com>
Subject: Re: [Phishing Risk] [External] Re: [PATCH v2] mm/hugetlb: add mempolicy check in the reservation routine
Date: Fri, 24 Jul 2020 16:26:29 +0200 [thread overview]
Message-ID: <20200724142629.GA31772@dhcp22.suse.cz> (raw)
In-Reply-To: <CAMZfGtUVHN4HA45d18zxQVUJvWyVPimvKG=y3YDPJBhu4ocLPQ@mail.gmail.com>
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
next prev parent reply other threads:[~2020-07-24 14:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 10:03 Muchun Song
2020-07-24 11:34 ` Michal Hocko
2020-07-24 13:56 ` [Phishing Risk] [External] " Muchun Song
2020-07-24 14:26 ` Michal Hocko [this message]
2020-07-24 17:41 ` Mike Kravetz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200724142629.GA31772@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=guojianchao@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mike.kravetz@oracle.com \
--cc=rientjes@google.com \
--cc=songmuchun@bytedance.com \
--cc=walken@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox