mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
sched: Add SCHED_RESET_ON_FORK functionality for nice < 0 tasks
Signed-off-by: Mike Galbraith <[email protected]> Acked-by: Lennart Poettering <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
1 parent
b9dc29e72f
commit
6c697bdf08
1 file changed
+5
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user