Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a55b45036a677fac43fe81ddf7fdcd007aaaee7
Commit:     4a55b45036a677fac43fe81ddf7fdcd007aaaee7
Parent:     7c92e54f6f9601cfa9d8894ee248abcf62ed9a1c
Author:     Peter Zijlstra <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 5 14:32:49 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Sep 5 14:32:49 2007 +0200

    sched: improve prev_sum_exec_runtime setting
    
    Second preparatory patch for fix-ideal runtime:
    
    Mark prev_sum_exec_runtime at the beginning of our run, the same spot
    that adds our wait period to wait_runtime. This seems a more natural
    location to do this, and it also reduces the code a bit:
    
       text    data     bss     dec     hex filename
      13397     228    1204   14829    39ed sched.o.before
      13391     228    1204   14823    39e7 sched.o.after
    
    Signed-off-by: Peter Zijlstra <[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 f0dd4be..2d01bbc 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -684,10 +684,8 @@ __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct 
sched_entity *se,
         * preempt the current task unless the best task has
         * a larger than sched_granularity fairness advantage:
         */
-       if (__delta > niced_granularity(curr, granularity)) {
+       if (__delta > niced_granularity(curr, granularity))
                resched_task(rq_of(cfs_rq)->curr);
-               curr->prev_sum_exec_runtime = curr->sum_exec_runtime;
-       }
 }
 
 static inline void
@@ -703,6 +701,7 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity 
*se)
        update_stats_wait_end(cfs_rq, se);
        update_stats_curr_start(cfs_rq, se);
        set_cfs_rq_curr(cfs_rq, se);
+       se->prev_sum_exec_runtime = se->sum_exec_runtime;
 }
 
 static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq)
-
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