From: Tejun Heo <tj@kernel.org>
To: Waiman Long <longman@redhat.com>
Cc: "Zefan Li" <lizefan.x@bytedance.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Shuah Khan" <shuah@kernel.org>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-kselftest@vger.kernel.org,
"Chen Ridong" <chenridong@huawei.com>
Subject: Re: [PATCH-cgroup 2/5] cgroup/cpuset: Clear effective_xcpus on cpus_allowed clearing only if cpus.exclusive not set
Date: Mon, 5 Aug 2024 10:53:18 -1000 [thread overview]
Message-ID: <ZrE7vkGZsBRdlaQP@slm.duckdns.org> (raw)
In-Reply-To: <20240805013019.724300-3-longman@redhat.com>
On Sun, Aug 04, 2024 at 09:30:16PM -0400, Waiman Long wrote:
> Commit e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for
> v2") adds a user writable cpuset.cpus.exclusive file for setting
> exclusive CPUs to be used for the creation of partitions. Since then
> effective_xcpus depends on both the cpuset.cpus and cpuset.cpus.exclusive
> setting. If cpuset.cpus.exclusive is set, effective_xcpus will depend
> only on cpuset.cpus.exclusive. When it is not set, effective_xcpus
> will be set according to the cpuset.cpus value when the cpuset becomes
> a valid partition root.
>
> When cpuset.cpus is being cleared by the user, effective_xcpus should
> only be cleared when cpuset.cpus.exclusive is not set. However, that
> is not currently the case.
>
> # cd /sys/fs/cgroup/
> # mkdir test
> # echo +cpuset > cgroup.subtree_control
> # cd test
> # echo 3 > cpuset.cpus.exclusive
> # cat cpuset.cpus.exclusive.effective
> 3
> # echo > cpuset.cpus
> # cat cpuset.cpus.exclusive.effective // was cleared
>
> Fix it by clearing effective_xcpus only if cpuset.cpus.exclusive is
> not set.
>
> Fixes: e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2")
> Reported-by: Chen Ridong <chenridong@huawei.com>
> Signed-off-by: Waiman Long <longman@redhat.com>
Applied 1-2 to cgroup/for-6.11-fixes w/ stable cc'd.
Thanks.
--
tejun
next prev parent reply other threads:[~2024-08-05 20:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 1:30 [PATCH-cgroup 0/5] cgroup/cpuset: Miscellaneous cpuset updates for 6.12 Waiman Long
2024-08-05 1:30 ` [PATCH-cgroup 1/5] cgroup/cpuset: fix panic caused by partcmd_update Waiman Long
2024-08-05 1:30 ` [PATCH-cgroup 2/5] cgroup/cpuset: Clear effective_xcpus on cpus_allowed clearing only if cpus.exclusive not set Waiman Long
2024-08-05 20:53 ` Tejun Heo [this message]
2024-08-05 1:30 ` [PATCH-cgroup 3/5] cgroup/cpuset: Eliminate unncessary sched domains rebuilds in hotplug Waiman Long
2024-08-05 20:55 ` Tejun Heo
2024-08-05 1:30 ` [PATCH-cgroup 4/5] cgroup/cpuset: Check for partition roots with overlapping CPUs Waiman Long
2024-08-05 1:30 ` [PATCH-cgroup 5/5] selftest/cgroup: Add new test cases to test_cpuset_prs.sh Waiman Long
2024-08-05 20:58 ` Tejun Heo
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=ZrE7vkGZsBRdlaQP@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=mkoutny@suse.com \
--cc=shuah@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