aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched_fair.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index cc97ea498f24..e386e5dfcdae 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -728,11 +728,11 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
728 728
729 vruntime -= thresh; 729 vruntime -= thresh;
730 } 730 }
731
732 /* ensure we never gain time by being placed backwards. */
733 vruntime = max_vruntime(se->vruntime, vruntime);
734 } 731 }
735 732
733 /* ensure we never gain time by being placed backwards. */
734 vruntime = max_vruntime(se->vruntime, vruntime);
735
736 se->vruntime = vruntime; 736 se->vruntime = vruntime;
737} 737}
738 738
@@ -1756,6 +1756,8 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
1756 sched_info_queued(p); 1756 sched_info_queued(p);
1757 1757
1758 update_curr(cfs_rq); 1758 update_curr(cfs_rq);
1759 if (curr)
1760 se->vruntime = curr->vruntime;
1759 place_entity(cfs_rq, se, 1); 1761 place_entity(cfs_rq, se, 1);
1760 1762
1761 /* 'curr' will be NULL if the child belongs to a different group */ 1763 /* 'curr' will be NULL if the child belongs to a different group */