summaryrefslogtreecommitdiff
path: root/kernel/sched/idle_task.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2012-02-11 06:05:00 +0100
committerIngo Molnar <mingo@kernel.org>2014-02-10 16:17:19 +0100
commit678d5718d8d099421b0dd54c01b0528f4aaf5919 (patch)
treee2e31b84b5baee6e5496d6304f93c4a22e575846 /kernel/sched/idle_task.c
parentf10447998a59b97747c16258a9c6e6a1512f27f3 (diff)
sched/fair: Optimize cgroup pick_next_task_fair()
Since commit 2f36825b1 ("sched: Next buddy hint on sleep and preempt path") it is likely we pick a new task from the same cgroup, doing a put and then set on all intermediate entities is a waste of time, so try to avoid this. Measured using: mount nodev /cgroup -t cgroup -o cpu cd /cgroup mkdir a; cd a mkdir b; cd b mkdir c; cd c echo $$ > tasks perf stat --repeat 10 -- taskset 1 perf bench sched pipe PRE : 4.542422684 seconds time elapsed ( +- 0.33% ) POST: 4.389409991 seconds time elapsed ( +- 0.32% ) Which shows a significant improvement of ~3.5% Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/1328936700.2476.17.camel@laptop Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/idle_task.c')
0 files changed, 0 insertions, 0 deletions