Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e62dd02ed0af35631c6ca473e50758c9594773cf
Commit:     e62dd02ed0af35631c6ca473e50758c9594773cf
Parent:     ace8b3d633f93da8535921bf3e3679db3c619578
Author:     Dmitry Adamushko <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 17:00:14 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 17:00:14 2007 +0200

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 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 410b77a..3ac096e 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)
                vruntime += sched_vslice_add(cfs_rq, se);
 
        if (!initial) {
-               struct task_struct *p = container_of(se, struct task_struct, 
se);
-
-               if (sched_feat(NEW_FAIR_SLEEPERS) && p->policy != SCHED_BATCH)
+               if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se) &&
+                               task_of(se)->policy != SCHED_BATCH)
                        vruntime -= sysctl_sched_latency;
 
                vruntime = max_t(s64, vruntime, se->vruntime);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to