Commit:     d02e5ed8d55e2a2b2735232ea1da40ffbf4c0932
Parent:     29f59db3a74b0bdf78a1f5b53ef773caa82692dc
Author:     Dmitry Adamushko <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 17:00:07 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 17:00:07 2007 +0200

    sched: sched_setscheduler() fix
    Fix a problem in the 'sched-group' patch for !CONFIG_FAIR_GROUP_SCHED.
    if (task_running()) p->sched_class->put_prev_entity();
    [ this one sets up cfs_rq->curr to NULL ]
    if (task_running) p->sched_class->set_curr_task();
    [ and this one is a _NOP_ (empty) for !CONFIG_FAIR_GROUP_SCHED ]
    As a result, the task continues to run with cfs_rq->curr == NULL... no
    crashes (due to checks for !NULL in place) but e.g. update_curr()
    effectively becomes a NOP... i.e. runtime statistics for this task is
    not accounted untill it's rescheduled anew.
    Signed-off-by: Dmitry Adamushko <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
    Reviewed-by: Thomas Gleixner <[EMAIL PROTECTED]>
 kernel/sched_fair.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 12ab933..144f3ef 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -984,6 +984,10 @@ static void set_curr_task_fair(struct rq *rq)
 static void set_curr_task_fair(struct rq *rq)
+       struct sched_entity *se = &rq->curr->se;
+       struct cfs_rq *cfs_rq = cfs_rq_of(se);
+       cfs_rq->curr = se;
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

Reply via email to