Skip to content
Commit c43c5ea7 authored by Tejun Heo's avatar Tejun Heo
Browse files

cgroup: Make cgroup_rstat_updated() ready for root cgroup usage



cgroup_rstat_updated() ensures that the cgroup's rstat is linked to
the parent.  If there's no parent, it never gets linked and the
function ends up grabbing and releasing the cgroup_rstat_lock each
time for no reason which can be expensive.

This hasn't been a problem till now because nobody was calling the
function for the root cgroup but rstat is gonna be exposed to
controllers and use cases, so let's get ready.  Make
cgroup_rstat_updated() an no-op for the root cgroup.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 9a9e97b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment