Lines Matching refs:this_rq

4784 static int newidle_balance(struct rq *this_rq, struct rq_flags *rf);
6011 if (rq == this_rq()) {
7451 struct rq *this_rq = this_rq();
7471 if (unlikely(this_rq->wake_stamp < now)) {
7472 while (this_rq->wake_stamp < now && this_rq->wake_avg_idle) {
7473 this_rq->wake_stamp++;
7474 this_rq->wake_avg_idle >>= 1;
7478 avg_idle = this_rq->wake_avg_idle;
7528 this_rq->wake_avg_idle -= min(this_rq->wake_avg_idle, time);
7656 this_rq()->nr_running <= 1 &&
8068 struct root_domain *rd = this_rq()->rd;
11560 static int load_balance(int this_cpu, struct rq *this_rq,
11573 .dst_rq = this_rq,
12348 SCHED_WARN_ON(rq != this_rq());
12460 static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
12467 int this_cpu = this_rq->cpu;
12570 static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
12572 unsigned int flags = this_rq->nohz_idle_balance;
12577 this_rq->nohz_idle_balance = 0;
12582 _nohz_idle_balance(this_rq, flags);
12605 static void nohz_newidle_balance(struct rq *this_rq)
12607 int this_cpu = this_rq->cpu;
12617 if (this_rq->avg_idle < sysctl_sched_migration_cost)
12635 static inline bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
12640 static inline void nohz_newidle_balance(struct rq *this_rq) { }
12652 static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)
12655 int this_cpu = this_rq->cpu;
12663 update_misfit_status(NULL, this_rq);
12669 if (this_rq->ttwu_pending)
12676 this_rq->idle_stamp = rq_clock(this_rq);
12690 rq_unpin_lock(this_rq, rf);
12693 sd = rcu_dereference_check_sched_domain(this_rq->sd);
12695 if (!READ_ONCE(this_rq->rd->overload) ||
12696 (sd && this_rq->avg_idle < sd->max_newidle_lb_cost)) {
12706 raw_spin_rq_unlock(this_rq);
12718 if (this_rq->avg_idle < curr_cost + sd->max_newidle_lb_cost)
12723 pulled_task = load_balance(this_cpu, this_rq,
12739 if (pulled_task || this_rq->nr_running > 0 ||
12740 this_rq->ttwu_pending)
12745 raw_spin_rq_lock(this_rq);
12747 if (curr_cost > this_rq->max_idle_balance_cost)
12748 this_rq->max_idle_balance_cost = curr_cost;
12755 if (this_rq->cfs.h_nr_running && !pulled_task)
12759 if (this_rq->nr_running != this_rq->cfs.h_nr_running)
12764 if (time_after(this_rq->next_balance, next_balance))
12765 this_rq->next_balance = next_balance;
12768 this_rq->idle_stamp = 0;
12770 nohz_newidle_balance(this_rq);
12772 rq_repin_lock(this_rq, rf);
12783 struct rq *this_rq = this_rq();
12784 enum cpu_idle_type idle = this_rq->idle_balance ?
12792 if (cpu_isolated(this_rq->cpu))
12803 if (nohz_idle_balance(this_rq, idle))
12807 update_blocked_averages(this_rq->cpu);
12808 rebalance_domains(this_rq, idle);
13101 struct rq *rq = this_rq();