From: Tejun Heo <tj@kernel.org>
To: Waiman Long <longman@redhat.com>
Cc: "Chen Ridong" <chenridong@huaweicloud.com>,
"Chen Ridong" <chenridong@huawei.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] cgroup/cpuset: Skip security check for hotplug induced v1 task migration
Date: Mon, 30 Mar 2026 08:21:04 -1000 [thread overview]
Message-ID: <acq_ELmOia9K8dw4@slm.duckdns.org> (raw)
In-Reply-To: <83e3d0fd-ab1c-4078-ae0a-e902e92fcdb6@redhat.com>
Hello,
On Mon, Mar 30, 2026 at 12:15:01PM -0400, Waiman Long wrote:
...
> > If there are many tasks in the cpuset that has no CPUs, they will be migrated
> > one by one. I'm afraid that only the first task will succeed, and the rest will
> > fail because the flag is cleared after processing the first one.
>
> The setsched_check flag is used in the cgroup_taskset_for_each() loop below.
> That loop is going to iterate all the tasks to be migrated and so the flag
> will apply to all of them. So it is not just the first one.
During migration, a taskset is used to group tasks in a thread group if
cgroup_migrate() called with %true @threadgroup. That doens't really apply
here. cgroup_transfer_tasks() doesn't set @threadgroup and even if it were
to set set, there can just be multiple procesess. Besides, it's rather odd
for it be a one-shot param that gets cleared deep in the stack. Wouldn't it
make more sense to make whoever sets it to be responsible for clearing it?
Thanks.
--
tejun
next prev parent reply other threads:[~2026-03-30 18:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-29 17:39 [PATCH v2 0/3] cgroup/cpuset: Fix v1 task migration failure from empty cpuset Waiman Long
2026-03-29 17:39 ` [PATCH v2 1/3] cgroup/cpuset: Simplify setsched decision check in task iteration loop of cpuset_can_attach() Waiman Long
2026-03-29 17:39 ` [PATCH v2 2/3] cgroup/cpuset: Skip security check for hotplug induced v1 task migration Waiman Long
2026-03-30 1:48 ` Chen Ridong
2026-03-30 16:15 ` Waiman Long
2026-03-30 18:21 ` Tejun Heo [this message]
2026-03-31 3:15 ` Waiman Long
2026-03-29 17:39 ` [PATCH v2 3/3] cgroup/cpuset: Improve check for v1 task migration out of empty cpuset Waiman Long
2026-03-30 18:25 ` Tejun Heo
2026-03-31 1:05 ` Waiman Long
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=acq_ELmOia9K8dw4@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=chenridong@huaweicloud.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mkoutny@suse.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