diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-02-07 14:58:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-02-22 12:08:43 -0500 |
commit | d6b1e9119787fd2e31dcf0f0ce90b71197604206 (patch) | |
tree | 7115c54f7f35bc92a6211aa42fd722f72475ea9a /kernel/sched/core.c | |
parent | 8f47b1871b8aac98f1a9d93bc3467fb97b65199a (diff) |
sched: Adjust p->sched_reset_on_fork when nothing else changes
If the policy and priority remain unchanged a possible modification of
p->sched_reset_on_fork gets lost in the early exit path.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[ Rebase ontop of v3.14-rc1. ]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1391803122-4425-5-git-send-email-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index c94e851dc981..771eb8762df4 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -3362,7 +3362,8 @@ recheck: | |||
3362 | } | 3362 | } |
3363 | 3363 | ||
3364 | /* | 3364 | /* |
3365 | * If not changing anything there's no need to proceed further: | 3365 | * If not changing anything there's no need to proceed further, |
3366 | * but store a possible modification of reset_on_fork. | ||
3366 | */ | 3367 | */ |
3367 | if (unlikely(policy == p->policy)) { | 3368 | if (unlikely(policy == p->policy)) { |
3368 | if (fair_policy(policy) && attr->sched_nice != task_nice(p)) | 3369 | if (fair_policy(policy) && attr->sched_nice != task_nice(p)) |
@@ -3372,6 +3373,7 @@ recheck: | |||
3372 | if (dl_policy(policy)) | 3373 | if (dl_policy(policy)) |
3373 | goto change; | 3374 | goto change; |
3374 | 3375 | ||
3376 | p->sched_reset_on_fork = reset_on_fork; | ||
3375 | task_rq_unlock(rq, p, &flags); | 3377 | task_rq_unlock(rq, p, &flags); |
3376 | return 0; | 3378 | return 0; |
3377 | } | 3379 | } |