Skip to content

Commit

Permalink
sched: reorder update_cpu_load(rq) with the ->task_tick() call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Aug 9, 2007
1 parent 0915c4e commit f1a438d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1a438d

Please sign in to comment.