tick-sched: change the cpu that updates rq_stats

It can happen that the scheduler tick stops on cpu 0 but keeps
running on some other cpu. Make the cpu in-charge of updating
the jiffies also update the rq_stats.

Change-Id: Idb1a8132bd96500c68c516b4a99663965cec28e1
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
This commit is contained in:
Amar Singhal
2011-12-19 13:17:51 -08:00
parent 0c629385ae
commit f10f2a8bad

View File

@@ -807,8 +807,7 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
update_process_times(user_mode(regs)); update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING); profile_tick(CPU_PROFILING);
if ((rq_info.init == 1) && (tick_do_timer_cpu == cpu)) {
if ((rq_info.init == 1) && (cpu == 0)) {
/* /*
* update run queue statistics * update run queue statistics