From: Waiman Long <longman@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Chen Ridong" <chenridong@huaweicloud.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
"Aaron Tomlin" <atomlin@atomlin.com>,
"Juri Lelli" <juri.lelli@redhat.com>
Subject: Re: [PATCH cgroup/for-next 0/4] cgroup/cpuset: Support multiple source/destination cpusets for cpuset_*attach()
Date: Fri, 15 May 2026 19:13:52 -0400 [thread overview]
Message-ID: <40ee8cb3-575e-427b-a33b-459e88e31184@redhat.com> (raw)
In-Reply-To: <4f49602d35d987e029b8e92a577f0c60@kernel.org>
On 5/14/26 5:46 PM, Tejun Heo wrote:
> Hello,
>
> Quick AI-assisted review pass; passing the points along for human eyes.
Thank for passing the AI review info.
> Patch 4:
>
> - The leader loop comment says "Only v1 supports memory_migrate", but
> CS_MEMORY_MIGRATE is set unconditionally on v2 cpusets in
> cpuset_css_alloc(). With v2 controller-disable folding children with
> differing effective_mems into the parent, picking a single
> llist_entry(src_cs_head.first, ...) as oldcs passes the wrong source
> nodemask to cpuset_migrate_mm() for every leader whose actual source
> differs. Looks like the source needs to be looked up per leader.
I falsely assumes that CS_MEMORY_MIGRATE isn't set for v2. I am going to
move the cpuset_migrate_mm() call into cpuset_attach_task() as well. To
enable access to right oldcs information, I have to reluctantly add the
oldcs pointer to task_struct as that is the simplest way moving forward.
>
> - cs->old_mems_allowed updates are inconsistent across destinations: the
> mid-loop transition assigns cs->effective_mems (raw) while the tail
> assignment uses cpuset_attach_nodemask_to (after guarantee_online_mems).
> The v2 fast-path also updates only the first-task cs, leaving other
> destinations on dst_cs_head stale.
I will clarify the confusion and fix the v2 fast-path in v2.
> Patch 3:
>
> - Changelog says "the newly cloned task isn't the group leader", but for
> CLONE_INTO_CGROUP without CLONE_THREAD the new task is its own
> group_leader, so the new mpol_rebind_mm() block in cpuset_attach_task()
> does run from cpuset_fork(). Either acknowledge as an incidental
> improvement or guard the new path.
Will update the patch description.
>
> Patch 1:
>
> - alloc_dl_bw() reads confusingly next to the scheduler's dl_bw_alloc()
> while doing more (pick cpu, call dl_bw_alloc, record cs->dl_bw_cpu).
> Something like cpuset_reserve_dl_bw() would be clearer.
Sure, cpuset_reserve_dl_bw() sounds like a good name.
> - The relocated "Mark attach is in progress" comment sits inside a
> braceless else; either move it above the if (ret) or brace both arms.
Will add the additional braces though that will be removed in a later patch.
Cheers,
Longman
>
> Patch 2 looked clean.
>
> Thanks.
>
> --
> tejun
>
prev parent reply other threads:[~2026-05-15 23:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 17:02 [PATCH cgroup/for-next 0/4] cgroup/cpuset: Support multiple source/destination cpusets for cpuset_*attach() Waiman Long
2026-05-14 17:02 ` [PATCH cgroup/for-next 1/4] cgroup/cpuset: Add an alloc_dl_bw() helper Waiman Long
2026-05-14 17:02 ` [PATCH cgroup/for-next 2/4] cgroup/cpuset: Expand the scope of cpuset_can_attach_check() Waiman Long
2026-05-14 17:02 ` [PATCH cgroup/for-next 3/4] cgroup/cpuset: Optimize cpuset_attach_task() Waiman Long
2026-05-14 17:02 ` [PATCH cgroup/for-next 4/4] cgroup/cpuset: Support multiple source/destination cpusets for cpuset_*attach() Waiman Long
2026-05-14 21:46 ` [PATCH cgroup/for-next 0/4] " Tejun Heo
2026-05-15 23:13 ` Waiman Long [this message]
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=40ee8cb3-575e-427b-a33b-459e88e31184@redhat.com \
--to=longman@redhat.com \
--cc=atomlin@atomlin.com \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huaweicloud.com \
--cc=dietmar.eggemann@arm.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=tj@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