mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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>
This commit is contained in:
parent
213c8af67f
commit
9f508f8258
@ -1108,21 +1108,21 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
|
||||
* until it reschedules once. We set up the key so that
|
||||
* it will preempt the parent:
|
||||
*/
|
||||
p->se.fair_key = current->se.fair_key -
|
||||
se->fair_key = curr->fair_key -
|
||||
niced_granularity(curr, sched_granularity(cfs_rq)) - 1;
|
||||
/*
|
||||
* The first wait is dominated by the child-runs-first logic,
|
||||
* so do not credit it with that waiting time yet:
|
||||
*/
|
||||
if (sysctl_sched_features & SCHED_FEAT_SKIP_INITIAL)
|
||||
p->se.wait_start_fair = 0;
|
||||
se->wait_start_fair = 0;
|
||||
|
||||
/*
|
||||
* The statistical average of wait_runtime is about
|
||||
* -granularity/2, so initialize the task with that:
|
||||
*/
|
||||
if (sysctl_sched_features & SCHED_FEAT_START_DEBIT) {
|
||||
p->se.wait_runtime = -(sched_granularity(cfs_rq) / 2);
|
||||
se->wait_runtime = -(sched_granularity(cfs_rq) / 2);
|
||||
schedstat_add(cfs_rq, wait_runtime, se->wait_runtime);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user