From: Valentin Schneider <vschneid@redhat.com>
To: "Waiman Long" <longman@redhat.com>, "Michal Koutný" <mkoutny@suse.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] cgroup/cpuset: Keep current cpus list if cpus affinity was explicitly set
Date: Thu, 28 Jul 2022 17:50:01 +0100 [thread overview]
Message-ID: <xhsmhbkt9dvwm.mognet@vschneid.remote.csb> (raw)
In-Reply-To: <a58852b4-313a-9271-f31d-f79a91ec188b@redhat.com>
On 28/07/22 10:59, Waiman Long wrote:
> On 7/28/22 10:44, Michal Koutný wrote:
>> This should apply only to tasks that were extracted out of the root
>> cgroup, no? (OK, those are all processes practically.)
> The reset is done on all cgroups in a particular subtree. In the case of
> cgroup root, it is all the processes in the system.
>>
I've been briefly playing with this, tasks in the cgroup root don't seem
affected on my end (QEMU + buildroot + latest tip/sched/core):
$ mount -t cgroup2 none /sys/fs/cgroup
$ /root/loop.sh &
$ PID=$!
$ taskset -pc 2-3 $PID
pid 177's current affinity list: 0-3
pid 177's new affinity list: 2,3
$ echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control
$ taskset -pc $PID
pid 177's current affinity list: 2,3
However tasks extracted out as mentioned by Michal definitely are:
$ mount -t cgroup2 none /sys/fs/cgroup
$ /root/loop.sh &
$ PID=$!
$ taskset -pc 2-3 $PID
pid 172's current affinity list: 0-3
pid 172's new affinity list: 2,3
$ mkdir /sys/fs/cgroup/foobar
$ echo $PID > /sys/fs/cgroup/foobar/cgroup.procs
$ taskset -pc $PID
pid 172's current affinity list: 2,3
$ echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control
$ taskset -pc $PID
pid 172's current affinity list: 0-3
IIUC this is just what happens anytime a task gets migrated to a new
cpuset. Initially loop.sh remains attached to the root cpuset, and the echo
+cpuset migrates it to the /foobar one.
Does that match what you're seeing?
next prev parent reply other threads:[~2022-07-28 16:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 0:58 Waiman Long
2022-07-28 0:58 ` [PATCH 2/2] cgroup: Skip subtree root in cgroup_update_dfl_csses() Waiman Long
2022-07-28 14:44 ` Michal Koutný
2022-07-28 14:49 ` Waiman Long
2022-07-28 17:26 ` Tejun Heo
2022-07-28 17:27 ` Tejun Heo
2022-07-28 14:44 ` [PATCH 1/2] cgroup/cpuset: Keep current cpus list if cpus affinity was explicitly set Michal Koutný
2022-07-28 14:59 ` Waiman Long
2022-07-28 15:23 ` Michal Koutný
2022-07-28 15:35 ` Waiman Long
2022-07-28 16:50 ` Valentin Schneider [this message]
2022-07-28 17:42 ` Waiman Long
2022-07-28 17:23 ` Tejun Heo
2022-07-28 18:57 ` Waiman Long
2022-07-28 19:02 ` Tejun Heo
2022-07-28 19:21 ` Waiman Long
2022-07-28 20:44 ` Tejun Heo
2022-07-28 21:04 ` Waiman Long
2022-07-28 21:39 ` Tejun Heo
2022-07-29 14:15 ` Valentin Schneider
2022-07-29 14:50 ` Waiman Long
2022-07-29 18:31 ` 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=xhsmhbkt9dvwm.mognet@vschneid.remote.csb \
--to=vschneid@redhat.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=cgroups@vger.kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mkoutny@suse.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.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
all inboxes | Powered by JetHome®