cgroup: replace cgroup_on_dfl() tests in controllers with cgroup_subsys_on_dfl()
cgroup_on_dfl() tests whether the cgroup's root is the default hierarchy; however, an individual controller is only interested in whether the controller is attached to the default hierarchy and never tests a cgroup which doesn't belong to the hierarchy that the controller is attached to. This patch replaces cgroup_on_dfl() tests in controllers with faster static_key based cgroup_subsys_on_dfl(). This leaves cgroup core as the only user of cgroup_on_dfl() and the function is moved from the header file to cgroup.c. Signed-off-by:Tejun Heo <tj@kernel.org> Acked-by:
Zefan Li <lizefan@huawei.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org>
Showing
- block/blk-throttle.c 1 addition, 1 deletionblock/blk-throttle.c
- block/cfq-iosched.c 2 additions, 2 deletionsblock/cfq-iosched.c
- include/linux/cgroup.h 0 additions, 58 deletionsinclude/linux/cgroup.h
- kernel/cgroup.c 58 additions, 0 deletionskernel/cgroup.c
- kernel/cpuset.c 13 additions, 10 deletionskernel/cpuset.c
- mm/memcontrol.c 2 additions, 2 deletionsmm/memcontrol.c
Loading
Please register or sign in to comment