提交 f1860c34 编写于 作者: I Ingo Molnar

Merge branch 'sched/urgent' into sched/core

......@@ -1433,9 +1433,10 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd);
static unsigned long cpu_avg_load_per_task(int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long nr_running = rq->nr_running;
if (rq->nr_running)
rq->avg_load_per_task = rq->load.weight / rq->nr_running;
if (nr_running)
rq->avg_load_per_task = rq->load.weight / nr_running;
else
rq->avg_load_per_task = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册