]> git.karo-electronics.de Git - linux-beck.git/commit
sched/fair: Optimize sum computation with a lookup table
authorYuyang Du <yuyang.du@intel.com>
Mon, 2 May 2016 21:54:27 +0000 (05:54 +0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 May 2016 07:41:08 +0000 (09:41 +0200)
commit7b20b916e953cabef569541f991a0a583bc344cb
treed2893671351afb263793839f6b854b8be1d64be5
parent7b5953345efe4f226bb52cbea04558d16ec7ebfa
sched/fair: Optimize sum computation with a lookup table

__compute_runnable_contrib() uses a loop to compute sum, whereas a
table lookup can do it faster in a constant amount of time.

The program to generate the constants is located at:

  Documentation/scheduler/sched-avg.txt

Signed-off-by: Yuyang Du <yuyang.du@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Morten Rasmussen <morten.rasmussen@arm.com>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bsegall@google.com
Cc: dietmar.eggemann@arm.com
Cc: juri.lelli@arm.com
Cc: pjt@google.com
Link: http://lkml.kernel.org/r/1462226078-31904-2-git-send-email-yuyang.du@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c