mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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: Li 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: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
4434e51564
commit
c40c6f85a7
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue