History

Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Ingo Molnar: "This is a revert to fix an interactivity problem. The proper fixes for the problems that the reverted commit exposed are now in sched/core (consisting of 3 patches), but were too risky for v4.6 and will arrive in the v4.7 merge window" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "sched/fair: Fix fairness issue on migration"

Linus Torvalds committed 10 years ago

Commit 65643e32 parents f7f4d43 53d3bc71 file · +6 −14Browse files

Unified · Split

kernel/sched/fair.c+6−14
@@ -3188,25 +3188,17 @@ static inline void check_schedstat_required(void) · 3187 unmodified lines
31883188 static void
31893189 enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
31903190 {
3191− bool renorm = !(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING);
3192− bool curr = cfs_rq->curr == se;
3193−
31943191 /*
3195− * If we're the current task, we must renormalise before calling
3196− * update_curr().
3192+ * Update the normalized vruntime before updating min_vruntime
3193+ * through calling update_curr().
31973194 */
3198− if (renorm && curr)
3195+ if (!(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING))
31993196 se->vruntime += cfs_rq->min_vruntime;
32003197
3201− update_curr(cfs_rq);
3202−
32033198 /*
3204− * Otherwise, renormalise after, such that we're placed at the current
3205− * moment in time, instead of some random moment in the past.
3199+ * Update run-time statistics of the 'current'.
32063200 */
3207− if (renorm && !curr)
3208− se->vruntime += cfs_rq->min_vruntime;
3209−
3201+ update_curr(cfs_rq);
32103202 enqueue_entity_load_avg(cfs_rq, se);
32113203 account_entity_enqueue(cfs_rq, se);
32123204 update_cfs_shares(cfs_rq);
@@ -3222,7 +3214,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) · 9 unmodified lines
32223214 update_stats_enqueue(cfs_rq, se);
32233215 check_spread(cfs_rq, se);
32243216 }
3225− if (!curr)
3217+ if (se != cfs_rq->curr)
32263218 __enqueue_entity(cfs_rq, se);
32273219 se->on_rq = 1;
32283220