diff options
| author | Paul Turner <pjt@google.com> | 2009-07-10 20:05:16 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-07-11 04:00:09 -0400 |
| commit | d07387b490b1c43bfcb9f3900faf96f2dafb2630 (patch) | |
| tree | 97893ceda1e7262df981e87374f2553a6a8dba34 | |
| parent | c20b08e3986c2dbfa6df1e880bf4f7159994d199 (diff) | |
sched: Fix bug in SCHED_IDLE interaction with group scheduling
One of the isolation modifications for SCHED_IDLE is the
unitization of sleeper credit. However the check for this
assumes that the sched_entity we're placing always belongs to a
task.
This is potentially not true with group scheduling and leaves
us rummaging randomly when we try to pull the policy.
Signed-off-by: Paul Turner <pjt@google.com>
Cc: peterz@infradead.org
LKML-Reference: <alpine.DEB.1.00.0907101649570.29914@kitami.corp.google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | kernel/sched_fair.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index ba7fd6e9556f..7c248dc30f41 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
| @@ -687,7 +687,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
| 687 | * all of which have the same weight. | 687 | * all of which have the same weight. |
| 688 | */ | 688 | */ |
| 689 | if (sched_feat(NORMALIZED_SLEEPER) && | 689 | if (sched_feat(NORMALIZED_SLEEPER) && |
| 690 | task_of(se)->policy != SCHED_IDLE) | 690 | (!entity_is_task(se) || |
| 691 | task_of(se)->policy != SCHED_IDLE)) | ||
| 691 | thresh = calc_delta_fair(thresh, se); | 692 | thresh = calc_delta_fair(thresh, se); |
| 692 | 693 | ||
| 693 | vruntime -= thresh; | 694 | vruntime -= thresh; |
