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

    sched: optimize task_new_fair()
    
    due to the fact that we no longer keep the 'current' within the tree,
    dequeue/enqueue_entity() is useless for the 'current' in
    task_new_fair(). We are about to reschedule and
    sched_class->put_prev_task() will put the 'current' back into the tree,
    based on its new key.
    
       text    data     bss     dec     hex filename
      24388    2734      20   27142    6a06 sched.o.before
      24341    2734      20   27095    69d7 sched.o.after
    
    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 |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index b9e426a..827a063 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -972,10 +972,11 @@ static void task_new_fair(struct rq *rq, struct 
task_struct *p)
 
        if (sysctl_sched_child_runs_first &&
                        curr->vruntime < se->vruntime) {
-
-               dequeue_entity(cfs_rq, curr, 0);
+               /*
+                * Upon rescheduling, sched_class::put_prev_task() will place
+                * 'current' within the tree based on its new key value.
+                */
                swap(curr->vruntime, se->vruntime);
-               enqueue_entity(cfs_rq, curr, 0);
        }
 
        update_stats_enqueue(cfs_rq, 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  http://vger.kernel.org/majordomo-info.html

Reply via email to