sched: Use jump labels to reduce overhead when bandwidth control is inactive
authorPaul Turner <pjt@google.com>
Tue, 8 Nov 2011 04:26:33 +0000 (20:26 -0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 16 Nov 2011 07:48:18 +0000 (08:48 +0100)
commit56f570e512eeb5b412cb3a62234adc446a8eb32b
treecabaea188d6e35c077abc34fda40cc83aea9ea37
parentfccfdc6f0d8c83c854eeb6d93aa158f0e551bd49
sched: Use jump labels to reduce overhead when bandwidth control is inactive

Now that the linkage of jump-labels has been fixed they show a measurable
improvement in overhead for the enabled-but-unused case.

Workload is:

 'taskset -c 0 perf stat --repeat 50 -e instructions,cycles,branches
  bash -c "for ((i=0;i<5;i++)); do $(dirname $0)/pipe-test 20000; done"'

There's a speedup for all situations:

                 instructions            cycles                  branches
 -------------------------------------------------------------------------
 Intel Westmere
 base            806611770               745895590               146765378
 +jumplabel      803090165 (-0.44%)      713381840 (-4.36%)      144561130

 AMD Barcelona
 base            824657415               740055589               148855354
 +jumplabel      821056910 (-0.44%)      737558389 (-0.34%)      146635229

Signed-off-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111108042736.560831357@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
kernel/sched_fair.c
This page took 0.026381 seconds and 5 git commands to generate.