aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 721fe7744874..9f06094e5275 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1094,10 +1094,11 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr)
1094static void task_new_fair(struct rq *rq, struct task_struct *p) 1094static void task_new_fair(struct rq *rq, struct task_struct *p)
1095{ 1095{
1096 struct cfs_rq *cfs_rq = task_cfs_rq(p); 1096 struct cfs_rq *cfs_rq = task_cfs_rq(p);
1097 struct sched_entity *se = &p->se; 1097 struct sched_entity *se = &p->se, *curr = cfs_rq_curr(cfs_rq);
1098 1098
1099 sched_info_queued(p); 1099 sched_info_queued(p);
1100 1100
1101 update_curr(cfs_rq);
1101 update_stats_enqueue(cfs_rq, se); 1102 update_stats_enqueue(cfs_rq, se);
1102 /* 1103 /*
1103 * Child runs first: we let it run before the parent 1104 * Child runs first: we let it run before the parent
@@ -1105,7 +1106,7 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
1105 * it will preempt the parent: 1106 * it will preempt the parent:
1106 */ 1107 */
1107 p->se.fair_key = current->se.fair_key - 1108 p->se.fair_key = current->se.fair_key -
1108 niced_granularity(&rq->curr->se, sched_granularity(cfs_rq)) - 1; 1109 niced_granularity(curr, sched_granularity(cfs_rq)) - 1;
1109 /* 1110 /*
1110 * The first wait is dominated by the child-runs-first logic, 1111 * The first wait is dominated by the child-runs-first logic,
1111 * so do not credit it with that waiting time yet: 1112 * so do not credit it with that waiting time yet: