diff options
| author | Ken Chen <[email protected]> | 2008-12-16 06:02:01 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2008-12-16 11:15:00 +0000 |
| commit | 720f54988e17b33f3f477010b3a68ee872d20d5a (patch) | |
| tree | ebb475d1a7af97926c1f469a57bef47c46e9ae98 /net/unix/af_unix.c | |
| parent | sched: optimize update_curr() (diff) | |
| download | kernel-720f54988e17b33f3f477010b3a68ee872d20d5a.tar.gz kernel-720f54988e17b33f3f477010b3a68ee872d20d5a.zip | |
sched, cpuacct: refactoring cpuusage_read / cpuusage_write
Impact: micro-optimize the code on 64-bit architectures
In the thread regarding to 'export percpu cpuacct cgroup stats'
http://lkml.org/lkml/2008/12/7/13
akpm pointed out that current cpuacct code is inefficient. This patch
refactoring the following:
* make cpu_rq locking only on 32-bit
* change iterator to each_present_cpu instead of each_possible_cpu to
make it hotplug friendly.
It's a bit of code churn, but I was rewarded with 160 byte code size saving
on x86-64 arch and zero code size change on i386.
Signed-off-by: Ken Chen <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Li Zefan <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
