OSDN Git Service

cgroup/cpuset: avoid unneeded cpuset_mutex re-lock
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 4 Jul 2023 12:03:52 +0000 (20:03 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 10 Jul 2023 20:26:06 +0000 (10:26 -1000)
commit48f074565bb7eaa9ae502b2b2d423b1e50325e1b
treebf90c7270b0a94abf6901bcf354d747b32166018
parenta453be9725a1aa3f602f5b4c66eefd1fb4ba7c44
cgroup/cpuset: avoid unneeded cpuset_mutex re-lock

cpuset_mutex unlock and lock pair is only needed when transferring tasks
out of empty cpuset. Avoid unneeded cpuset_mutex re-lock when !is_empty
to save cpu cycles.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c