]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Avoid redundant EAS calculation
authorQuentin Perret <qperret@qperret.net>
Fri, 20 Sep 2019 09:41:15 +0000 (11:41 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 25 Sep 2019 15:42:32 +0000 (17:42 +0200)
commit3e683c537383e15f94d437380c97a960c07af110
treefae92c41feea34131bc861123220f2efb33bdd6a
parentf9f6c6ba3226d107e3795e5d190265260e4bdf94
sched/fair: Avoid redundant EAS calculation

The EAS wake-up path computes the system energy for several CPU
candidates: the CPU with maximum spare capacity in each performance
domain, and the prev_cpu. However, if prev_cpu also happens to be the
CPU with maximum spare capacity in its performance domain, the energy
calculation is still done twice, unnecessarily.

Add a condition to filter out this corner case before doing the energy
calculation.

Reported-by: Pavan Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Quentin Perret <qperret@qperret.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dietmar.eggemann@arm.com
Cc: juri.lelli@redhat.com
Cc: morten.rasmussen@arm.com
Cc: qais.yousef@arm.com
Cc: rjw@rjwysocki.net
Cc: tkjos@google.com
Cc: valentin.schneider@arm.com
Cc: vincent.guittot@linaro.org
Fixes: a34abbfe2c23 ("sched/fair: Speed-up energy-aware wake-ups")
Link: https://lkml.kernel.org/r/20190920094115.GA11503@qperret.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c