From: Chuyi Zhou <zhouchuyi@bytedance.com>
To: K Prateek Nayak <kprateek.nayak@amd.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
Cc: chengming.zhou@linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [External] Re: [PATCH 2/3] sched/fair: Ignore isolated cpus in update_numa_stat
Date: Wed, 18 Dec 2024 15:19:43 +0800 [thread overview]
Message-ID: <1c7a042e-65e9-4774-a769-55b3c01af181@bytedance.com> (raw)
In-Reply-To: <92168453-ecf0-4849-970d-4c19a5a610dc@amd.com>
Hello Prateek
在 2024/12/18 14:26, K Prateek Nayak 写道:
> Hello Chuyi,
>
> On 12/16/2024 5:53 PM, Chuyi Zhou wrote:
>> [..snip..] @@ -2125,6 +2125,11 @@ static void update_numa_stats(struct
>> task_numa_env *env,
>> for_each_cpu(cpu, cpumask_of_node(nid)) {
>
> Looking at sched_init_domains(), we only build sched domains only for
> active CPUs in housekeeping_cpumask(HK_TYPE_DOMAIN) so similar to the
> question on Patch 3, can we get away with just modifying this outer loop
> to:
>
> for_each_cpu_and(cpu, cpumask_of_node(nid),
> housekeeping_cpumask(HK_TYPE_DOMAIN)) {
> ...
> }
>
> Thoughts?
>
We now have two ways of using isolated CPUs.
One is the isolcpus= kernel command line. 'isolcpus=0-7' would
exclude 0-7 cpus from housekeeping_cpumask without further restrictions
on tasks' cpumasks. A typical case that could lead to errors is when a
task's CPU mask covers all the CPUs in the system, causing the task to
potentially be migrated to or woken up on CPUs 0-7. Commit 23d04d8
resolves a similar issue in task wakeup.
The other is the isolated cpuset partition:
mkdir blue
echo 5-8 > blue/cpuset.cpus
echo "isolated" > blue/cpuset.cpus.partition
The 5-8 cpus now is also a isolated domain, but 5-8 would not be
excluded from housekeeping_cpumask. The tasks' cpumask in blue cgroup
would be restricted to 5-8.
I thinks in update_numa_stats(), only using
housekeeping_cpumask(HK_TYPE_DOMAIN) is not enough because it cannot
skip those isolated cpuset partitions.
Thanks.
next prev parent reply other threads:[~2024-12-18 7:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 12:23 [PATCH 0/3] Take the scheduling domain into account in numa balancing Chuyi Zhou
2024-12-16 12:23 ` [PATCH 1/3] sched/fair: Remove unused task_numa_migrate return value Chuyi Zhou
2024-12-18 6:29 ` K Prateek Nayak
2024-12-23 12:34 ` Chuyi Zhou
2024-12-16 12:23 ` [PATCH 2/3] sched/fair: Ignore isolated cpus in update_numa_stat Chuyi Zhou
2024-12-18 6:26 ` K Prateek Nayak
2024-12-18 7:19 ` Chuyi Zhou [this message]
2024-12-16 12:23 ` [PATCH 3/3] sched/fair: Ensure select housekeeping cpus in task_numa_find_cpu Chuyi Zhou
2024-12-18 6:21 ` K Prateek Nayak
2024-12-23 12:58 ` Chuyi Zhou
2024-12-27 4:40 ` K Prateek Nayak
2024-12-27 7:59 ` Chuyi Zhou
2025-01-02 5:49 ` K Prateek Nayak
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=1c7a042e-65e9-4774-a769-55b3c01af181@bytedance.com \
--to=zhouchuyi@bytedance.com \
--cc=bsegall@google.com \
--cc=chengming.zhou@linux.dev \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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 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®