]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sched/cpuset: Bring back cpuset_mutex
authorJuri Lelli <juri.lelli@redhat.com>
Sun, 20 Aug 2023 15:22:54 +0000 (16:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:18:20 +0000 (16:18 +0200)
commitd0eb4917f4d36f106e2c5daa9598f6f8bd08a734
tree11b81d890ff418a47d8aca0a3ef4464d280b188b
parent918879de0e23ca9fc60b8ad1c996d12a813c9316
sched/cpuset: Bring back cpuset_mutex

commit 111cd11bbc54850f24191c52ff217da88a5e639b upstream.

Turns out percpu_cpuset_rwsem - commit 1243dc518c9d ("cgroup/cpuset:
Convert cpuset_mutex to percpu_rwsem") - wasn't such a brilliant idea,
as it has been reported to cause slowdowns in workloads that need to
change cpuset configuration frequently and it is also not implementing
priority inheritance (which causes troubles with realtime workloads).

Convert percpu_cpuset_rwsem back to regular cpuset_mutex. Also grab it
only for SCHED_DEADLINE tasks (other policies don't care about stable
cpusets anyway).

Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
[ Conflict in kernel/cgroup/cpuset.c due to pulling changes in functions
  or comments that don't exist on this branch. Remove a BUG_ON() for rwsem
  that doesn't exist on mainline. ]
Signed-off-by: Qais Yousef (Google) <qyousef@layalina.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/cpuset.h
kernel/cgroup/cpuset.c
kernel/sched/core.c