Commit e78e70db authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

sched/fair: Small cleanup to sched_balance_newidle()

parent d206fbad
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -12879,14 +12879,16 @@ static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf)

	rcu_read_lock();
	sd = rcu_dereference_check_sched_domain(this_rq->sd);
	if (!sd) {
		rcu_read_unlock();
		goto out;
	}

	if (!get_rd_overloaded(this_rq->rd) ||
	    (sd && this_rq->avg_idle < sd->max_newidle_lb_cost)) {
	    this_rq->avg_idle < sd->max_newidle_lb_cost) {

		if (sd)
		update_next_balance(sd, &next_balance);
		rcu_read_unlock();

		goto out;
	}
	rcu_read_unlock();