]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cgroup/cpuset: Introduce cpuset_cpus_allowed_locked()
authorPingfan Liu <piliu@redhat.com>
Wed, 19 Nov 2025 09:55:24 +0000 (17:55 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 20 Nov 2025 16:57:58 +0000 (06:57 -1000)
commit1f382215119a0bc165e766e5bc424b3d3e8dae35
treeb1d170e334a3ff08088559646c7a01841503dc8c
parenta0131c39270de634c33950a799d8870da2191974
cgroup/cpuset: Introduce cpuset_cpus_allowed_locked()

cpuset_cpus_allowed() uses a reader lock that is sleepable under RT,
which means it cannot be called inside raw_spin_lock_t context.

Introduce a new cpuset_cpus_allowed_locked() helper that performs the
same function as cpuset_cpus_allowed() except that the caller must have
acquired the cpuset_mutex so that no further locking will be needed.

Suggested-by: Waiman Long <longman@redhat.com>
Signed-off-by: Pingfan Liu <piliu@redhat.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: linux-kernel@vger.kernel.org
To: cgroups@vger.kernel.org
Reviewed-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cpuset.h
kernel/cgroup/cpuset.c