diff options
author | Dmitry Adamushko <dmitry.adamushko@gmail.com> | 2007-10-15 11:00:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:14 -0400 |
commit | e62dd02ed0af35631c6ca473e50758c9594773cf (patch) | |
tree | 5bc942a91fac6e48d046997bef8dbfcb9c3a8d3b /kernel/sched_fair.c | |
parent | ace8b3d633f93da8535921bf3e3679db3c619578 (diff) |
sched: fix group scheduling for SCHED_BATCH
The following patch (sched: disable sleeper_fairness on SCHED_BATCH)
seems to break GROUP_SCHED. Although, it may be 'oops'-less due to the
possibility of 'p' being always a valid address.
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 410b77aea216..3ac096e74faf 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -485,9 +485,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
485 | vruntime += sched_vslice_add(cfs_rq, se); | 485 | vruntime += sched_vslice_add(cfs_rq, se); |
486 | 486 | ||
487 | if (!initial) { | 487 | if (!initial) { |
488 | struct task_struct *p = container_of(se, struct task_struct, se); | 488 | if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se) && |
489 | 489 | task_of(se)->policy != SCHED_BATCH) | |
490 | if (sched_feat(NEW_FAIR_SLEEPERS) && p->policy != SCHED_BATCH) | ||
491 | vruntime -= sysctl_sched_latency; | 490 | vruntime -= sysctl_sched_latency; |
492 | 491 | ||
493 | vruntime = max_t(s64, vruntime, se->vruntime); | 492 | vruntime = max_t(s64, vruntime, se->vruntime); |