Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a07b1164 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Add checks for frequency change"

parents 6c0caf8d 72bbd4b7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6777,6 +6777,10 @@ done:
fail:
	double_rq_unlock(rq_src, rq_dest);
	raw_spin_unlock(&p->pi_lock);
	if (moved && !same_freq_domain(src_cpu, dest_cpu)) {
		check_for_freq_change(rq_src);
		check_for_freq_change(rq_dest);
	}
	if (moved && task_notify_on_migrate(p)) {
		struct migration_notify_data mnd;

+14 −3
Original line number Diff line number Diff line
@@ -6718,6 +6718,7 @@ static int active_load_balance_cpu_stop(void *data)
		.flags		= 0,
		.loop		= 0,
	};
	bool moved = false;

	raw_spin_lock_irq(&busiest_rq->lock);

@@ -6747,8 +6748,10 @@ static int active_load_balance_cpu_stop(void *data)
	if (push_task) {
		if (push_task->on_rq && push_task->state == TASK_RUNNING &&
		    task_cpu(push_task) == busiest_cpu &&
		    cpu_online(target_cpu))
		    cpu_online(target_cpu)) {
			move_task(push_task, &env);
			moved = true;
		}
		goto out_unlock_balance;
	}

@@ -6764,11 +6767,13 @@ static int active_load_balance_cpu_stop(void *data)
		env.sd = sd;
		schedstat_inc(sd, alb_count);

		if (move_one_task(&env))
		if (move_one_task(&env)) {
			schedstat_inc(sd, alb_pushed);
		else
			moved = true;
		} else {
			schedstat_inc(sd, alb_failed);
		}
	}
	rcu_read_unlock();
out_unlock_balance:
	double_unlock_balance(busiest_rq, target_rq);
@@ -6782,6 +6787,12 @@ out_unlock:
		busiest_rq->push_task = NULL;
	}
	raw_spin_unlock_irq(&busiest_rq->lock);

	if (moved && !same_freq_domain(busiest_cpu, target_cpu)) {
		check_for_freq_change(busiest_rq);
		check_for_freq_change(target_rq);
	}

	if (per_cpu(dbs_boost_needed, target_cpu)) {
		struct migration_notify_data mnd;