You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
cgroup: Fix rootcg cpu.stat guest double counting
[ Upstream commit81c49d39ae] In account_guest_time in kernel/sched/cputime.c guest time is attributed to both CPUTIME_NICE and CPUTIME_USER in addition to CPUTIME_GUEST_NICE and CPUTIME_GUEST respectively. Therefore, adding both to calculate usage results in double counting any guest time at the rootcg. Fixes:936f2a70f2("cgroup: add cpu.stat file to root cgroup") Signed-off-by: Dan Schatzberg <schatzberg.dan@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a3fdcd16b1
commit
9308f9c9c7
@@ -421,8 +421,6 @@ static void root_cgroup_cputime(struct task_cputime *cputime)
|
||||
cputime->sum_exec_runtime += user;
|
||||
cputime->sum_exec_runtime += sys;
|
||||
cputime->sum_exec_runtime += cpustat[CPUTIME_STEAL];
|
||||
cputime->sum_exec_runtime += cpustat[CPUTIME_GUEST];
|
||||
cputime->sum_exec_runtime += cpustat[CPUTIME_GUEST_NICE];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user