diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-08-28 06:53:24 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-08-28 06:53:24 -0400 |
commit | 9f508f8258e18e9333f18daf1f0860df48d49ed2 (patch) | |
tree | 6784a82e1bdc2206233f3fd388f68be22f9254fa /kernel | |
parent | 213c8af67f21c1dc0d50940b159d9521c95f3c89 (diff) |
sched: clean up task_new_fair()
cleanup: we have the 'se' and 'curr' entity-pointers already,
no need to use p->se and current->se.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched_fair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 75f025da6f7c..ce39282d9c0d 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1108,21 +1108,21 @@ static void task_new_fair(struct rq *rq, struct task_struct *p) | |||
1108 | * until it reschedules once. We set up the key so that | 1108 | * until it reschedules once. We set up the key so that |
1109 | * it will preempt the parent: | 1109 | * it will preempt the parent: |
1110 | */ | 1110 | */ |
1111 | p->se.fair_key = current->se.fair_key - | 1111 | se->fair_key = curr->fair_key - |
1112 | niced_granularity(curr, sched_granularity(cfs_rq)) - 1; | 1112 | niced_granularity(curr, sched_granularity(cfs_rq)) - 1; |
1113 | /* | 1113 | /* |
1114 | * The first wait is dominated by the child-runs-first logic, | 1114 | * The first wait is dominated by the child-runs-first logic, |
1115 | * so do not credit it with that waiting time yet: | 1115 | * so do not credit it with that waiting time yet: |
1116 | */ | 1116 | */ |
1117 | if (sysctl_sched_features & SCHED_FEAT_SKIP_INITIAL) | 1117 | if (sysctl_sched_features & SCHED_FEAT_SKIP_INITIAL) |
1118 | p->se.wait_start_fair = 0; | 1118 | se->wait_start_fair = 0; |
1119 | 1119 | ||
1120 | /* | 1120 | /* |
1121 | * The statistical average of wait_runtime is about | 1121 | * The statistical average of wait_runtime is about |
1122 | * -granularity/2, so initialize the task with that: | 1122 | * -granularity/2, so initialize the task with that: |
1123 | */ | 1123 | */ |
1124 | if (sysctl_sched_features & SCHED_FEAT_START_DEBIT) { | 1124 | if (sysctl_sched_features & SCHED_FEAT_START_DEBIT) { |
1125 | p->se.wait_runtime = -(sched_granularity(cfs_rq) / 2); | 1125 | se->wait_runtime = -(sched_granularity(cfs_rq) / 2); |
1126 | schedstat_add(cfs_rq, wait_runtime, se->wait_runtime); | 1126 | schedstat_add(cfs_rq, wait_runtime, se->wait_runtime); |
1127 | } | 1127 | } |
1128 | 1128 | ||