android_kernel_motorola_sm6225/kernel/sched
Peter Zijlstra 678d5718d8 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>
2014-02-10 16:17:19 +01:00
..
auto_group.c sched/autogroup: Fix race with task_groups list 2013-05-28 09:40:22 +02:00
auto_group.h
clock.c sched/clock: Fixup early initialization 2014-01-23 14:48:36 +01:00
completion.c sched: Move completion code from core.c to completion.c 2013-11-06 07:49:19 +01:00
core.c sched: Push put_prev_task() into pick_next_task() 2014-02-10 16:17:13 +01:00
cpuacct.c cgroup: replace cftype->read_seq_string() with cftype->seq_show() 2013-12-05 12:28:04 -05:00
cpuacct.h sched/cpuacct: Initialize root cpuacct earlier 2013-04-10 13:54:20 +02:00
cpudeadline.c sched/deadline: Fix sparse static warnings 2014-01-16 09:27:03 +01:00
cpudeadline.h sched/deadline: speed up SCHED_DEADLINE pushes with a push-heap 2014-01-13 13:46:46 +01:00
cpupri.c sched: Fix some kernel-doc warnings 2013-07-18 09:58:21 +02:00
cpupri.h
cputime.c sched: Implement task_nice() as static inline function 2014-02-09 15:28:23 +01:00
deadline.c sched: Push put_prev_task() into pick_next_task() 2014-02-10 16:17:13 +01:00
debug.c sched/numa: Rename p->numa_faults to numa_faults_memory 2014-01-28 13:17:05 +01:00
fair.c sched/fair: Optimize cgroup pick_next_task_fair() 2014-02-10 16:17:19 +01:00
features.h sched/numa: Resist moving tasks towards nodes with fewer hinting faults 2013-10-09 12:40:27 +02:00
idle_task.c sched: Push put_prev_task() into pick_next_task() 2014-02-10 16:17:13 +01:00
Makefile sched/deadline: speed up SCHED_DEADLINE pushes with a push-heap 2014-01-13 13:46:46 +01:00
proc.c sched: Change get_rq_runnable_load() to static and inline 2013-06-27 10:07:44 +02:00
rt.c sched: Push put_prev_task() into pick_next_task() 2014-02-10 16:17:13 +01:00
sched.h sched: Push put_prev_task() into pick_next_task() 2014-02-10 16:17:13 +01:00
stats.c fix a leak in /proc/schedstats 2013-04-29 15:41:45 -04:00
stats.h sched: Micro-optimize by dropping unnecessary task_rq() calls 2013-09-25 13:51:06 +02:00
stop_task.c sched: Push put_prev_task() into pick_next_task() 2014-02-10 16:17:13 +01:00
wait.c sched: Move wait code from core.c to wait.c 2013-11-06 07:49:18 +01:00