aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_fair.c14
-rw-r--r--kernel/sched_features.h10
2 files changed, 21 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 6766959c7f44..280892e9d85e 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1165,9 +1165,17 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync)
1165 load = source_load(prev_cpu, idx); 1165 load = source_load(prev_cpu, idx);
1166 this_load = target_load(this_cpu, idx); 1166 this_load = target_load(this_cpu, idx);
1167 1167
1168 if (sync && (curr->se.avg_overlap > sysctl_sched_migration_cost || 1168 if (sync) {
1169 p->se.avg_overlap > sysctl_sched_migration_cost)) 1169 if (sched_feat(SYNC_LESS) &&
1170 sync = 0; 1170 (curr->se.avg_overlap > sysctl_sched_migration_cost ||
1171 p->se.avg_overlap > sysctl_sched_migration_cost))
1172 sync = 0;
1173 } else {
1174 if (sched_feat(SYNC_MORE) &&
1175 (curr->se.avg_overlap < sysctl_sched_migration_cost &&
1176 p->se.avg_overlap < sysctl_sched_migration_cost))
1177 sync = 1;
1178 }
1171 1179
1172 /* 1180 /*
1173 * If sync wakeup then subtract the (maximum possible) 1181 * If sync wakeup then subtract the (maximum possible)
diff --git a/kernel/sched_features.h b/kernel/sched_features.h
index 294e10edd3c8..70115c69c7a9 100644
--- a/kernel/sched_features.h
+++ b/kernel/sched_features.h
@@ -63,6 +63,16 @@ SCHED_FEAT(SYNC_WAKEUPS, 1)
63SCHED_FEAT(AFFINE_WAKEUPS, 1) 63SCHED_FEAT(AFFINE_WAKEUPS, 1)
64 64
65/* 65/*
66 * Weaken SYNC hint based on overlap
67 */
68SCHED_FEAT(SYNC_LESS, 1)
69
70/*
71 * Add SYNC hint based on overlap
72 */
73SCHED_FEAT(SYNC_MORE, 0)
74
75/*
66 * Prefer to schedule the task we woke last (assuming it failed 76 * Prefer to schedule the task we woke last (assuming it failed
67 * wakeup-preemption), since its likely going to consume data we 77 * wakeup-preemption), since its likely going to consume data we
68 * touched, increases cache locality. 78 * touched, increases cache locality.