diff options
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0f0258a5b453..dda59872cf31 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6160,6 +6160,14 @@ static unsigned long task_h_load(struct task_struct *p) #else static inline void update_blocked_averages(int cpu) { + struct rq *rq = cpu_rq(cpu); + unsigned long flags; + + raw_spin_lock_irqsave(&rq->lock, flags); + update_rq_clock(rq); + update_rq_runnable_avg(rq, rq->nr_running); + update_cfs_rq_blocked_load(&rq->cfs, 1); + raw_spin_unlock_irqrestore(&rq->lock, flags); } static unsigned long task_h_load(struct task_struct *p) @@ -7482,6 +7490,9 @@ more_balance: goto out; out_balanced: + /* We were balanced, so reset the balancing interval */ + sd->balance_interval = sd->min_interval; + /* * We reach balance although we may have faced some affinity * constraints. Clear the imbalance flag if it was set. @@ -8077,6 +8088,8 @@ static inline bool nohz_kick_needed(struct rq *rq) if (time_before(now, nohz.next_balance)) return false; + return true; + if (rq->nr_running >= 2) return true; |