]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cgroup/cpuset: Reduce the lock protecting CS_SCHED_LOAD_BALANCE
authorXiu Jianfeng <xiujianfeng@huawei.com>
Sat, 25 May 2024 09:46:48 +0000 (09:46 +0000)
committerTejun Heo <tj@kernel.org>
Sat, 1 Jun 2024 17:06:17 +0000 (07:06 -1000)
commit018ee567def3b43f810aebf15221eef3858177b2
treedfb6182596de3e200dddf1bff2985eb8d56bb4b4
parenta8d55ff5f3acf52e6380976fb5d0a9172032dcb0
cgroup/cpuset: Reduce the lock protecting CS_SCHED_LOAD_BALANCE

In the cpuset_css_online(), clearing the CS_SCHED_LOAD_BALANCE bit
of cs->flags is guarded by callback_lock and cpuset_mutex. There is
no problem with itself, because it is consistent with the description
of there two global lock at the beginning of this file. However, since
the operation of checking, setting and clearing the flag bit is atomic,
protection of callback_lock is unnecessary here, see CS_SPREAD_*. so
to make it more consistent with the other code, move the operation
outside the critical section of callback_lock.

No functional changes intended.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c