Commit 095e56c7 authored by Ingo Molnar's avatar Ingo Molnar

sched: fix startup penalty calculation

fix task startup penalty miscalculation: sysctl_sched_granularity is
unsigned int and wait_runtime is long so we first have to convert it
to long before turning it negative ...
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ea0aa3b2
......@@ -1047,7 +1047,7 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
* -granularity/2, so initialize the task with that:
*/
if (sysctl_sched_features & SCHED_FEAT_START_DEBIT)
p->se.wait_runtime = -(sysctl_sched_granularity / 2);
p->se.wait_runtime = -((long)sysctl_sched_granularity / 2);
__enqueue_entity(cfs_rq, se);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment