sched: reorder update_cpu_load(rq) with the ->task_tick() call
authorIngo Molnar <mingo@elte.hu>
Thu, 9 Aug 2007 09:16:45 +0000 (11:16 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 9 Aug 2007 09:16:45 +0000 (11:16 +0200)
Peter Williams suggested to flip the order of update_cpu_load(rq) with
the ->task_tick() call. This is a NOP for the current scheduler (the
two functions are independent of each other), ->task_tick() might
create some state for update_cpu_load() in the future (or in PlugSched).

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

index 72bb9483d9492422eef9a0b4f88bd49e00cfe857..4680f52974e323d407272c9bce602922da7ad30a 100644 (file)
@@ -3298,9 +3298,9 @@ void scheduler_tick(void)
        struct task_struct *curr = rq->curr;
 
        spin_lock(&rq->lock);
+       update_cpu_load(rq);
        if (curr != rq->idle) /* FIXME: needed? */
                curr->sched_class->task_tick(rq, curr);
-       update_cpu_load(rq);
        spin_unlock(&rq->lock);
 
 #ifdef CONFIG_SMP
This page took 0.029552 seconds and 5 git commands to generate.