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

Commit 1596e297 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

sched: symmetric sync vs avg_overlap



Reinstate the weakening of the sync hint if set. This yields a more
symmetric usage of avg_overlap.

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d942fb6c
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -2266,9 +2266,15 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
	if (!sched_feat(SYNC_WAKEUPS))
		sync = 0;

	if (!sync && (current->se.avg_overlap < sysctl_sched_migration_cost &&
			    p->se.avg_overlap < sysctl_sched_migration_cost))
	if (!sync) {
		if (current->se.avg_overlap < sysctl_sched_migration_cost &&
			  p->se.avg_overlap < sysctl_sched_migration_cost)
			sync = 1;
	} else {
		if (current->se.avg_overlap >= sysctl_sched_migration_cost ||
			  p->se.avg_overlap >= sysctl_sched_migration_cost)
			sync = 0;
	}

#ifdef CONFIG_SMP
	if (sched_feat(LB_WAKEUP_UPDATE)) {