]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cgroup/cpuset: Further optimize code if CONFIG_CPUSETS_V1 not set
authorWaiman Long <longman@redhat.com>
Sun, 10 Nov 2024 02:50:23 +0000 (21:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:04 +0000 (10:15 +0200)
commit1b06f00edaaa08ee23dba7972b24ede337c3a3cf
tree1e1307eae706050bd6242429c6e2fefcca93a154
parent6b145f8b22011743b563965df0e090789b413bb8
cgroup/cpuset: Further optimize code if CONFIG_CPUSETS_V1 not set

[ Upstream commit c4c9cebe2fb9cdc73e55513de7af7a4f50260e88 ]

Currently the cpuset code uses group_subsys_on_dfl() to check if we
are running with cgroup v2. If CONFIG_CPUSETS_V1 isn't set, there is
really no need to do this check and we can optimize out some of the
unneeded v1 specific code paths. Introduce a new cpuset_v2() and use it
to replace the cgroup_subsys_on_dfl() check to further optimize the
code.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Stable-dep-of: a22b3d54de94 ("cgroup/cpuset: Fix race between newly created partition and dying one")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/cgroup/cpuset.c