21 Mar, 2016
1 commit
-
- Use for() instead of while() loop in some functions
to make the code simpler.- Use this_cpu_ptr() instead of per_cpu_ptr() to make the code
cleaner and a bit faster.Suggested-by: Peter Zijlstra
Signed-off-by: Zhao Lei
Signed-off-by: Peter Zijlstra (Intel)
Cc: Linus Torvalds
Cc: Tejun Heo
Cc: Thomas Gleixner
Link: http://lkml.kernel.org/r/d8a7ef9592f55224630cb26dea239f05b6398a4e.1458187654.git.zhaolei@cn.fujitsu.com
Signed-off-by: Ingo Molnar
10 Apr, 2013
7 commits
-
Now we don't need cpuacct_init(), and instead we just initialize
root_cpuacct when it's defined.Signed-off-by: Li Zefan
Cc: Tejun Heo
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/51553834.9090701@huawei.com
Signed-off-by: Ingo Molnar -
Now most of the code in cpuacct.h can be moved to cpuacct.c
Signed-off-by: Li Zefan
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/515536D5.2080401@huawei.com
Signed-off-by: Ingo Molnar -
This is a micro optimazation for a hot path.
- We don't need to check if @ca returned from task_ca() is NULL.
- We don't need to check if @ca returned from parent_ca() is NULL.Signed-off-by: Li Zefan
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/515536B7.6060602@huawei.com
Signed-off-by: Ingo Molnar -
This is a micro optimization for the hot path.
- We don't need to check if @ca is NULL in parent_ca().
- We don't need to check if @ca is NULL in the beginning of the for loop.Signed-off-by: Li Zefan
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/515536A9.5000700@huawei.com
Signed-off-by: Ingo Molnar -
So we can remove open-coded cpuacct code in cputime.c.
Signed-off-by: Li Zefan
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/51553692.9060008@huawei.com
Signed-off-by: Ingo Molnar -
So we don't open-coded initialization of cpuacct in core.c.
Signed-off-by: Li Zefan
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/51553687.1060906@huawei.com
Signed-off-by: Ingo Molnar -
Add cpuacct.h and let sched.h include it.
Signed-off-by: Li Zefan
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/5155367B.2060506@huawei.com
Signed-off-by: Ingo Molnar