Skip to content

Commit 5a3c8fe

Browse files
author
Ingo Molnar
committed
Revert "cpuacct: reduce one NULL check in fast-path"
This reverts commit 7a46c59. This was applied to the x86 tree mistakenly, it belongs into the scheduler tree. Signed-off-by: Ingo Molnar <[email protected]>
1 parent 3fab191 commit 5a3c8fe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kernel/sched.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10001,11 +10001,10 @@ static void cpuacct_charge(struct task_struct *tsk, u64 cputime)
1000110001
cpu = task_cpu(tsk);
1000210002
ca = task_ca(tsk);
1000310003

10004-
do {
10004+
for (; ca; ca = ca->parent) {
1000510005
u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
1000610006
*cpuusage += cputime;
10007-
ca = ca->parent;
10008-
} while (ca);
10007+
}
1000910008
}
1001010009

1001110010
struct cgroup_subsys cpuacct_subsys = {

0 commit comments

Comments
 (0)