Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: fix init_idle()'s use of sched_clock()
sched: fix stale value in average load per task

+4 -1
+4 -1
kernel/sched.c
··· 1456 1456 1457 1457 if (rq->nr_running) 1458 1458 rq->avg_load_per_task = rq->load.weight / rq->nr_running; 1459 + else 1460 + rq->avg_load_per_task = 0; 1459 1461 1460 1462 return rq->avg_load_per_task; 1461 1463 } ··· 5870 5868 struct rq *rq = cpu_rq(cpu); 5871 5869 unsigned long flags; 5872 5870 5871 + spin_lock_irqsave(&rq->lock, flags); 5872 + 5873 5873 __sched_fork(idle); 5874 5874 idle->se.exec_start = sched_clock(); 5875 5875 ··· 5879 5875 idle->cpus_allowed = cpumask_of_cpu(cpu); 5880 5876 __set_task_cpu(idle, cpu); 5881 5877 5882 - spin_lock_irqsave(&rq->lock, flags); 5883 5878 rq->curr = rq->idle = idle; 5884 5879 #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) 5885 5880 idle->oncpu = 1;