Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2ddbf952508fb9911036c484a87f6351106b917c
Commit:     2ddbf952508fb9911036c484a87f6351106b917c
Parent:     368059a977871def0f88a92eefb6ecc1f7b6132f
Author:     Hiroshi Shimamoto <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 17:00:11 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 17:00:11 2007 +0200

    sched: clean up sched_fork()
    
    The adjusting sched_class is a missing part of the already existing "do
    not leak PI boosting priority to the child" at the sched_fork(). This
    patch moves the adjusting sched_class from wake_up_new_task() to
    sched_fork().
    
    this also shrinks the code a bit:
    
       text    data     bss     dec     hex filename
      40111    4018     292   44421    ad85 sched.o.before
      40102    4018     292   44412    ad7c sched.o.after
    
    Signed-off-by: Hiroshi Shimamoto <[EMAIL PROTECTED]>
    Signed-off-by: Dmitry Adamushko <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Reviewed-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 kernel/sched.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 36484da..cd2b494 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1663,6 +1663,8 @@ void sched_fork(struct task_struct *p, int clone_flags)
         * Make sure we do not leak PI boosting priority to the child:
         */
        p->prio = current->normal_prio;
+       if (!rt_prio(p->prio))
+               p->sched_class = &fair_sched_class;
 
 #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
        if (likely(sched_info_on()))
@@ -1698,11 +1700,6 @@ void fastcall wake_up_new_task(struct task_struct *p, 
unsigned long clone_flags)
 
        p->prio = effective_prio(p);
 
-       if (rt_prio(p->prio))
-               p->sched_class = &rt_sched_class;
-       else
-               p->sched_class = &fair_sched_class;
-
        if (task_cpu(p) != this_cpu || !p->sched_class->task_new ||
                                                        !current->se.on_rq) {
                activate_task(rq, p, 0);
-
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