From: Gregory Price <gourry@gourry.net>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Cc: linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com,
longman@redhat.com, ridong.chen@linux.dev, tj@kernel.org,
hannes@cmpxchg.org, mkoutny@suse.com, akpm@linux-foundation.org,
mgorman@suse.de
Subject: Re: [PATCH v2] cgroup/cpuset: use mems_allowed_seq when checking a policy nodemask
Date: Mon, 19 Oct 2026 12:53:10 -0400 [thread overview]
Message-ID: <atZKl0yVl5u624o1@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <805cfff2-1856-4b48-9afc-174a56405283@kernel.org>
On Mon, Oct 19, 2026 at 06:41:50PM +0200, Vlastimil Babka (SUSE) wrote:
> On 10/19/26 18:21, Gregory Price (Meta) wrote:
> > A cpuset update changes the task's mems_allowed and rebinds its
> > mempolicy in separate steps under mems_allowed_seq, but the check
> > reads both without it. This can cause a spurious numa placement
> > miss under some cpuset/mempolicy combinations.
> >
> > A reader that loads one mask before the update and the other after
> > it can see a spurious empty intersection and drop the nodemask.
> >
> > For example, a task with cpuset.mems={0} and MPOL_BIND={0}. If the
> > cpuset moves to mems={1,2}, the policy is rebound to {1}.
> >
> > The allocator can race and compare the old mems_allowed {0} against
> > the new policy {1} - which will result in a dropped nodemask and a
> > misplaced allocation on node 2.
>
> And since this can have only performance implications and not cause a
> functional issue, we don't need Cc: stable.
>
> (unlike violating a __GFP_THISNODE allocation which could be quite bad and
> has happened in the past)
>
Agreed.
~Gregory
next prev parent reply other threads:[~2026-10-19 16:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 16:21 Gregory Price (Meta)
2026-10-19 16:41 ` Vlastimil Babka (SUSE)
2026-10-19 16:53 ` Gregory Price [this message]
2026-10-19 23:16 ` Tejun Heo
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=atZKl0yVl5u624o1@gourry-fedora-PF4VCD3F \
--to=gourry@gourry.net \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mgorman@suse.de \
--cc=mkoutny@suse.com \
--cc=ridong.chen@linux.dev \
--cc=tj@kernel.org \
--cc=vbabka@kernel.org \
/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
all inboxes | Powered by JetHome®