lkml.org 
[lkml]   [2009]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectBug in SCHED_IDLE interaction with group scheduling?
Hi Peter,

It seems like there's an assumption in the sched_idle policy check in
place_entity that the sched_entity we are looking at belongs to a task?

- Paul

--

sched: 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>
---
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 ba7fd6e..7c248dc 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)
* all of which have the same weight.
*/
if (sched_feat(NORMALIZED_SLEEPER) &&
- task_of(se)->policy != SCHED_IDLE)
+ (!entity_is_task(se) ||
+ task_of(se)->policy != SCHED_IDLE))
thresh = calc_delta_fair(thresh, se);

vruntime -= thresh;
--
1.5.4.3


\
 
 \ /
  Last update: 2009-07-11 02:09    [W:0.028 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site