diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-08-09 05:16:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-08-09 05:16:45 -0400 |
commit | f1a438d813d416fa9f4be4e6dbd10b54c5938d89 (patch) | |
tree | 0aeb01cea731ed44d765c6a2d599edbd6db5c9c2 /kernel/sched.c | |
parent | 0915c4e89d311948b67cdd4c183a2efbcafcc9f9 (diff) |
sched: reorder update_cpu_load(rq) with the ->task_tick() call
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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 72bb9483d949..4680f52974e3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3298,9 +3298,9 @@ void scheduler_tick(void) | |||
3298 | struct task_struct *curr = rq->curr; | 3298 | struct task_struct *curr = rq->curr; |
3299 | 3299 | ||
3300 | spin_lock(&rq->lock); | 3300 | spin_lock(&rq->lock); |
3301 | update_cpu_load(rq); | ||
3301 | if (curr != rq->idle) /* FIXME: needed? */ | 3302 | if (curr != rq->idle) /* FIXME: needed? */ |
3302 | curr->sched_class->task_tick(rq, curr); | 3303 | curr->sched_class->task_tick(rq, curr); |
3303 | update_cpu_load(rq); | ||
3304 | spin_unlock(&rq->lock); | 3304 | spin_unlock(&rq->lock); |
3305 | 3305 | ||
3306 | #ifdef CONFIG_SMP | 3306 | #ifdef CONFIG_SMP |