From: Guopeng Zhang <guopeng.zhang@linux.dev>
To: Ridong Chen <ridong.chen@linux.dev>, Waiman Long <longman@redhat.com>
Cc: "Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
"Guopeng Zhang" <zhangguopeng@kylinos.cn>
Subject: Re: [PATCH] cgroup/cpuset: Defer sched domain rebuild to common unlock path
Date: Sun, 20 Sep 2026 10:26:05 +0800 [thread overview]
Message-ID: <f27e12d8-2e34-4c10-9773-d1af5b8538b6@linux.dev> (raw)
In-Reply-To: <c74015aa-0e51-4161-9fe8-c779a34c64ce@linux.dev>
在 2026/9/18 18:41, Ridong Chen 写道:
>
>
> On 9/18/2026 6:27 PM, Guopeng Zhang wrote:
>> From: Guopeng Zhang <zhangguopeng@kylinos.cn>
>>
>> Both callers of update_prstate(), cpuset_partition_write() and
>> cpuset_css_killed(), call cpuset_update_sd_hk_unlock() immediately
>> afterwards. That helper rebuilds sched domains when force_sd_rebuild is
>> set before releasing the cpuset locks, so the check in update_prstate()
>> is redundant.
>>
>> Commit 3bfe47967191 ("cgroup/cpuset: Move
>> housekeeping_update()/rebuild_sched_domains() together") removed the
>> same check from cpuset_write_resmask(). Remove the remaining one from
>> update_prstate().
>>
>> Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
>> ---
>> kernel/cgroup/cpuset.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index 8f24171..d58ecf5 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -3039,8 +3039,6 @@ out:
>> update_partition_sd_lb(cs, old_prs);
>> notify_partition_change(cs, old_prs);
>> - if (force_sd_rebuild)
>> - rebuild_sched_domains_locked();
>> free_tmpmasks(&tmpmask);
>> return 0;
>> }
>
> This title is confusing. I thought you were doing some async work, what does "defer" mean here? In fact, it just removes a piece of redundant code.
>
Thanks for the review.
I misunderstood this. I used "Defer" because the rebuild still happens later in cpuset_update_sd_hk_unlock().
You're right, the title is confusing. I'll fix it in v2.
Thanks,
Guopeng
next prev parent reply other threads:[~2026-09-20 2:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 10:27 [PATCH] cgroup/cpuset: Defer sched domain rebuild to common unlock path Guopeng Zhang
2026-09-18 10:41 ` Ridong Chen
2026-09-20 2:26 ` Guopeng Zhang [this message]
2026-09-20 3:26 ` Ridong Chen
2026-09-20 3:28 ` Ridong Chen
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=f27e12d8-2e34-4c10-9773-d1af5b8538b6@linux.dev \
--to=guopeng.zhang@linux.dev \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mkoutny@suse.com \
--cc=ridong.chen@linux.dev \
--cc=tj@kernel.org \
--cc=zhangguopeng@kylinos.cn \
/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.