mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
ANDROID: sched: Disable energy-unfriendly nohz kicks
With energy-aware scheduling enabled nohz_kick_needed() generates many nohz idle-balance kicks which lead to nothing when multiple tasks get packed on a single cpu to save energy. This causes unnecessary wake-ups and hence wastes energy. Make these conditions depend on !energy_aware() for now until the energy-aware nohz story gets sorted out. cc: Ingo Molnar <mingo@redhat.com> cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com> Signed-off-by: Andres Oportus <andresoportus@google.com>
This commit is contained in:
committed by
Dmitry Shmidt
parent
53065e82a1
commit
f69e2dc550
@@ -8928,12 +8928,13 @@ static inline bool nohz_kick_needed(struct rq *rq)
|
||||
if (time_before(now, nohz.next_balance))
|
||||
return false;
|
||||
|
||||
if (rq->nr_running >= 2)
|
||||
if (rq->nr_running >= 2 &&
|
||||
(!energy_aware() || cpu_overutilized(cpu)))
|
||||
return true;
|
||||
|
||||
rcu_read_lock();
|
||||
sds = rcu_dereference(per_cpu(sd_llc_shared, cpu));
|
||||
if (sds) {
|
||||
if (sds && !energy_aware()) {
|
||||
/*
|
||||
* XXX: write a coherent comment on why we do this.
|
||||
* See also: http://lkml.kernel.org/r/20111202010832.602203411@sbsiddha-desk.sc.intel.com
|
||||
|
||||
Reference in New Issue
Block a user