diff options
| author | Ingo Molnar <mingo@kernel.org> | 2016-05-11 02:25:53 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-05-11 02:25:53 -0400 |
| commit | 53d3bc773eaa7ab1cf63585e76af7ee869d5e709 (patch) | |
| tree | db53cf2c46e8a052f624889ff8283d0495280b85 /kernel | |
| parent | c5114626f33b62fa7595e57d87f33d9d1f8298a2 (diff) | |
Revert "sched/fair: Fix fairness issue on migration"
Mike reported that this recent commit:
3a47d5124a95 ("sched/fair: Fix fairness issue on migration")
... broke interactivity and the signal starvation test.
We have a proper fix series in the works but ran out of time for
v4.6, so revert the commit.
Reported-by: Mike Galbraith <efault@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/fair.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 40748dc8ea3e..e7dd0ec169be 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
| @@ -3188,25 +3188,17 @@ static inline void check_schedstat_required(void) | |||
| 3188 | static void | 3188 | static void |
| 3189 | enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) | 3189 | enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) |
| 3190 | { | 3190 | { |
| 3191 | bool renorm = !(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING); | ||
| 3192 | bool curr = cfs_rq->curr == se; | ||
| 3193 | |||
| 3194 | /* | 3191 | /* |
| 3195 | * If we're the current task, we must renormalise before calling | 3192 | * Update the normalized vruntime before updating min_vruntime |
| 3196 | * update_curr(). | 3193 | * through calling update_curr(). |
| 3197 | */ | 3194 | */ |
| 3198 | if (renorm && curr) | 3195 | if (!(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING)) |
| 3199 | se->vruntime += cfs_rq->min_vruntime; | 3196 | se->vruntime += cfs_rq->min_vruntime; |
| 3200 | 3197 | ||
| 3201 | update_curr(cfs_rq); | ||
| 3202 | |||
| 3203 | /* | 3198 | /* |
| 3204 | * Otherwise, renormalise after, such that we're placed at the current | 3199 | * Update run-time statistics of the 'current'. |
| 3205 | * moment in time, instead of some random moment in the past. | ||
| 3206 | */ | 3200 | */ |
| 3207 | if (renorm && !curr) | 3201 | update_curr(cfs_rq); |
| 3208 | se->vruntime += cfs_rq->min_vruntime; | ||
| 3209 | |||
| 3210 | enqueue_entity_load_avg(cfs_rq, se); | 3202 | enqueue_entity_load_avg(cfs_rq, se); |
| 3211 | account_entity_enqueue(cfs_rq, se); | 3203 | account_entity_enqueue(cfs_rq, se); |
| 3212 | update_cfs_shares(cfs_rq); | 3204 | update_cfs_shares(cfs_rq); |
| @@ -3222,7 +3214,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) | |||
| 3222 | update_stats_enqueue(cfs_rq, se); | 3214 | update_stats_enqueue(cfs_rq, se); |
| 3223 | check_spread(cfs_rq, se); | 3215 | check_spread(cfs_rq, se); |
| 3224 | } | 3216 | } |
| 3225 | if (!curr) | 3217 | if (se != cfs_rq->curr) |
| 3226 | __enqueue_entity(cfs_rq, se); | 3218 | __enqueue_entity(cfs_rq, se); |
| 3227 | se->on_rq = 1; | 3219 | se->on_rq = 1; |
| 3228 | 3220 | ||
