提交 6c697bdf 编写于 作者: M Mike Galbraith 提交者: Ingo Molnar

sched: Add SCHED_RESET_ON_FORK functionality for nice < 0 tasks

Signed-off-by: NMike Galbraith <efault@gmx.de>
Acked-by: NLennart Poettering <mzxreary@0pointer.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1245228482.27326.1.camel@marge.simson.net>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 b9dc29e7
......@@ -2627,6 +2627,11 @@ void sched_fork(struct task_struct *p, int clone_flags)
if (p->normal_prio < DEFAULT_PRIO)
p->prio = DEFAULT_PRIO;
if (PRIO_TO_NICE(p->static_prio) < 0) {
p->static_prio = NICE_TO_PRIO(0);
set_load_weight(p);
}
/*
* We don't need the reset flag anymore after the fork. It has
* fulfilled its duty:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册