Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c40c6f85 authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar
Browse files

cpuacct: add a branch prediction



cpuacct_charge() is in fast-path, and checking of !cpuacct_susys.active
always returns false after cpuacct has been initialized at system boot.

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Menage <menage@google.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4434e515
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9684,7 +9684,7 @@ static void cpuacct_charge(struct task_struct *tsk, u64 cputime)
	struct cpuacct *ca;
	int cpu;

	if (!cpuacct_subsys.active)
	if (unlikely(!cpuacct_subsys.active))
		return;

	cpu = task_cpu(tsk);