Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ae8393e508e5f17add66964688c49bf0bfe4fcf9
Commit:     ae8393e508e5f17add66964688c49bf0bfe4fcf9
Parent:     7bae49d498de87f0da0c20c67adaa278eac84566
Author:     Srivatsa Vaddagiri <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 21:18:11 2007 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 21:18:11 2007 +0100

    sched: move rcu_head to task_group struct
    
    Peter Zijlstra noticed that the rcu_head object need not be present
    in every cfs_rq of a group. Move it to the task_group structure
    instead.
    
    Signed-off-by: Srivatsa Vaddagiri <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 235952b..4704807 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -172,6 +172,7 @@ struct task_group {
        unsigned long shares;
        /* spinlock to serialize modification to shares */
        spinlock_t lock;
+       struct rcu_head rcu;
 };
 
 /* Default task group's sched entity on each cpu */
@@ -258,7 +259,6 @@ struct cfs_rq {
         */
        struct list_head leaf_cfs_rq_list; /* Better name : task_cfs_rq_list? */
        struct task_group *tg;    /* group that "owns" this runqueue */
-       struct rcu_head rcu;
 #endif
 };
 
@@ -7019,8 +7019,8 @@ err:
 /* rcu callback to free various structures associated with a task group */
 static void free_sched_group(struct rcu_head *rhp)
 {
-       struct cfs_rq *cfs_rq = container_of(rhp, struct cfs_rq, rcu);
-       struct task_group *tg = cfs_rq->tg;
+       struct task_group *tg = container_of(rhp, struct task_group, rcu);
+       struct cfs_rq *cfs_rq;
        struct sched_entity *se;
        int i;
 
@@ -7052,7 +7052,7 @@ void sched_destroy_group(struct task_group *tg)
        BUG_ON(!cfs_rq);
 
        /* wait for possible concurrent references to cfs_rqs complete */
-       call_rcu(&cfs_rq->rcu, free_sched_group);
+       call_rcu(&tg->rcu, free_sched_group);
 }
 
 /* change task's runqueue when it moves between groups.
-
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