]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sched: eliminate __rq_clock() use
authorIngo Molnar <mingo@elte.hu>
Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)
eliminate __rq_clock() use by changing it to:

   __update_rq_clock(rq)
   now = rq->clock;

identity transformation - no change in behavior.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
kernel/sched_fair.c

index 893211054790698a418aae9541528a2dd57fb1ed..d67345175179cd512e21447e97023b1d6c31cebb 100644 (file)
@@ -1967,9 +1967,12 @@ static void update_cpu_load(struct rq *this_rq)
        unsigned long total_load = this_rq->ls.load.weight;
        unsigned long this_load =  total_load;
        struct load_stat *ls = &this_rq->ls;
-       u64 now = __rq_clock(this_rq);
+       u64 now;
        int i, scale;
 
+       __update_rq_clock(this_rq);
+       now = this_rq->clock;
+
        this_rq->nr_load_updates++;
        if (unlikely(!(sysctl_sched_features & SCHED_FEAT_PRECISE_CPU_LOAD)))
                goto do_avg;
@@ -3458,7 +3461,8 @@ need_resched_nonpreemptible:
 
        spin_lock_irq(&rq->lock);
        clear_tsk_need_resched(prev);
-       now = __rq_clock(rq);
+       __update_rq_clock(rq);
+       now = rq->clock;
 
        if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
                if (unlikely((prev->state & TASK_INTERRUPTIBLE) &&
index 969f08c8bd345694bb45ce2d60ecd5e694c6f9ba..bd20fad3deffa3baa08050122dacbf59b3106745 100644 (file)
@@ -672,7 +672,10 @@ static void entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
 {
        struct rq *rq = rq_of(cfs_rq);
        struct sched_entity *next;
-       u64 now = __rq_clock(rq);
+       u64 now;
+
+       __update_rq_clock(rq);
+       now = rq->clock;
 
        /*
         * Dequeue and enqueue the task to update its
@@ -824,8 +827,10 @@ dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep, u64 now)
 static void yield_task_fair(struct rq *rq, struct task_struct *p)
 {
        struct cfs_rq *cfs_rq = task_cfs_rq(p);
-       u64 now = __rq_clock(rq);
+       u64 now;
 
+       __update_rq_clock(rq);
+       now = rq->clock;
        /*
         * Dequeue and enqueue the task to update its
         * position within the tree: