diff options
author | Jason Baron <jbaron@redhat.com> | 2011-08-05 16:40:40 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-08-05 23:57:33 +0200 |
commit | b77f0f3c1f587791aa5d9bd1b0012c9a89eb9258 (patch) | |
tree | 994a1acc79d69ae13caa965df035ae5da1828fb3 /lib/cmdline.c | |
parent | 6d158f3ec537bd6d3786196b6db97fcc0f973aef (diff) | |
download | linux-b77f0f3c1f587791aa5d9bd1b0012c9a89eb9258.tar.gz linux-b77f0f3c1f587791aa5d9bd1b0012c9a89eb9258.tar.bz2 linux-b77f0f3c1f587791aa5d9bd1b0012c9a89eb9258.zip |
jump label: Reduce the cycle count by changing the link order
In the course of testing jump labels for use with the CFS
bandwidth controller, Paul Turner, discovered that using jump
labels reduced the branch count and the instruction count, but
did not reduce the cycle count or wall time.
I noticed that having the jump_label.o included in the kernel
but not used in any way still caused this increase in cycle
count and wall time. Thus, I moved jump_label.o in the
kernel/Makefile, thus changing the link order, and presumably
moving it out of hot icache areas. This brought down the cycle
count/time as expected.
In addition to Paul's testing, I've tested the patch using a
single 'static_branch()' in the getppid() path, and basically
running tight loops of calls to getppid(). Here are my results
for the branch disabled case:
With jump labels turned on (CONFIG_JUMP_LABEL), branch disabled:
Performance counter stats for 'bash -c /tmp/getppid;true' (50 runs):
3,969,510,217 instructions # 0.864 IPC ( +-0.000% )
4,592,334,954 cycles ( +- 0.046% )
751,634,470 branches ( +- 0.000% )
1.722635797 seconds time elapsed ( +- 0.046% )
Jump labels turned off (CONFIG_JUMP_LABEL not set), branch
disabled:
Performance counter stats for 'bash -c /tmp/getppid;true' (50 runs):
4,009,611,846 instructions # 0.867 IPC ( +-0.000% )
4,622,210,580 cycles ( +- 0.012% )
771,662,904 branches ( +- 0.000% )
1.734341454 seconds time elapsed ( +- 0.022% )
Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: rth@redhat.com
Cc: a.p.zijlstra@chello.nl
Cc: rostedt@goodmis.org
Link: http://lkml.kernel.org/r/20110805204040.GG2522@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Paul Turner <pjt@google.com>
Diffstat (limited to 'lib/cmdline.c')
0 files changed, 0 insertions, 0 deletions