From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>,
"David Hildenbrand (Red Hat)" <david@kernel.org>,
<ljs@kernel.org>, Li Zhe <lizhe.67@bytedance.com>,
<mingo@redhat.com>, <peterz@infradead.org>,
<juri.lelli@redhat.com>, <vincent.guittot@linaro.org>,
<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
<kprateek.nayak@amd.com>, <linux-kernel@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<tim.c.chen@intel.com>, <mkoutny@suse.com>, <tj@kernel.org>,
<chen.yu@linux.dev>
Subject: Re: [PATCH 0/4] sched/numa: Add per-process automatic NUMA balancing control
Date: Fri, 16 Oct 2026 16:01:33 +0800 [thread overview]
Message-ID: <bcabbe25-5b2c-464a-a22d-5375a342f938@intel.com> (raw)
In-Reply-To: <CALOAHbDY6zLcEc4kGhC9GSFsOsREadkWN7Q4CmZuR_m_BMHAyg@mail.gmail.com>
On 10/16/2026 3:38 PM, Yafang Shao wrote:
> On Fri, Oct 16, 2026 at 1:51 PM Chen Yu <yu.c.chen@intel.com> wrote:
>> A more complex scenario is when cgroup A and cgroup B become threaded domains:
>>
>> root
>> / \
>> X Y
>> | |
>> A B A, B: threaded domains (thread roots)
>> / \ / \ separate memory.max / io.max
>> A1 A2 B1 B2 threaded cgroups
>> ^ ^
>> | |
>> +--------+
>> want to share one cache group
>>
>> In the above case, we might need to change the deployed cgroup hierarchy.
>
> I think we can enable LLC-aware scheduling for both A1 and A2 — does
> that sound right?
>
Here A1 wants to share data with B1, but A2 does not want to share data
with B2 nor B1 nor A1. Enabling cache-aware for A1 and A2 might not help
in this case.
>>
>> Suppose threads in A1 and threads in A2 belong to the same process Pa,
>> this reminds me of the cgroup bpf NUMA balancing case: after enabling
>> NUMA balancing for A1 but not setting it for A2, what would be the final
>> NUMA balancing decision for process Pa, is it enabled or disabled?
>> The NUMA balancing scan/invalid seems to be per process, so if we change
>> the setting of its threads, the whole process will be impacted. Or maybe
>> we should not enable NUMA balancing for threaded cgroups? Anyway I haven't
>> digged into your cgroup bpf patch set yet, let me try to look at it.
>
> cgroup NUMAB works the same way: the setting is per cgroup and opt-in.
> For Pa in your example, since its threads spread across A1 and A2, you
> would enable it on both — enabling it on only one of them is not
> meaningful.
>
I see. I haven't yet digged into your code, is there a per cgroup flag
cgroup.numab.enabled? Would there be a logic in the kernel, when
A1.numab.enabled
is written to true, the kernel detects all the other cgroups {X} that
contains threads
share the same mm_struct as A1's threads/tasks, and then update {X}'s
numab.enabled
to the same value as A1, to keep consistency? In summary, if threads are
spread
cross different cgroups, when you set the enable flag for 1 cgroup, will the
kernel iterates all the other cgroups to update their flags as well? Or
leverage userspace to do that?
thanks,
Chenyu
next prev parent reply other threads:[~2026-10-16 8:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 12:24 [PATCH 0/4] sched/numa: Add per-process automatic NUMA balancing control Li Zhe
2026-09-08 12:24 ` [PATCH 1/4] sched/numa: Track per-process automatic NUMA balancing mode Li Zhe
2026-10-13 9:54 ` Chen Yu
2026-09-08 12:24 ` [PATCH 2/4] sched/numa: Add prctl controls for process mode Li Zhe
2026-09-08 12:24 ` [PATCH 3/4] proc: Report process NUMA balancing mode Li Zhe
2026-09-08 12:24 ` [PATCH 4/4] Documentation: Describe per-process NUMA balancing control Li Zhe
2026-10-13 7:39 ` [PATCH 0/4] sched/numa: Add per-process automatic " Chen Yu
2026-10-13 9:31 ` Yafang Shao
2026-10-14 7:16 ` Li Zhe
2026-10-15 19:58 ` Tim Chen
2026-10-16 2:53 ` Yafang Shao
2026-10-16 5:38 ` Chen Yu
2026-10-16 7:38 ` Yafang Shao
2026-10-16 8:01 ` Chen, Yu C [this message]
2026-10-16 8:18 ` Yafang Shao
2026-10-14 7:05 ` Li Zhe
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=bcabbe25-5b2c-464a-a22d-5375a342f938@intel.com \
--to=yu.c.chen@intel.com \
--cc=bsegall@google.com \
--cc=chen.yu@linux.dev \
--cc=david@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=laoar.shao@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhe.67@bytedance.com \
--cc=ljs@kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mkoutny@suse.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tim.c.chen@intel.com \
--cc=tim.c.chen@linux.intel.com \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.