• Tejun Heo's avatar
    cgroup: use cgroup->last_bstat instead of cgroup->bstat_pending for consistency · 1bb5ec2e
    Tejun Heo authored
    cgroup->bstat_pending is used to determine the base stat delta to
    propagate to the parent.  While correct, this is different from how
    percpu delta is determined for no good reason and the inconsistency
    makes the code more difficult to understand.
    
    This patch makes parent propagation delta calculation use the same
    method as percpu to global propagation.
    
    * cgroup_base_stat_accumulate() is renamed to cgroup_base_stat_add()
      and cgroup_base_stat_sub() is added.
    
    * percpu propagation calculation is updated to use the above helpers.
    
    * cgroup->bstat_pending is replaced with cgroup->last_bstat and
      updated to use the same calculation as percpu propagation.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    1bb5ec2e
rstat.c 10.9 KB