aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 700aa9a1413f..b7480fb5c3dc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1453,7 +1453,7 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd);
1453static unsigned long cpu_avg_load_per_task(int cpu) 1453static unsigned long cpu_avg_load_per_task(int cpu)
1454{ 1454{
1455 struct rq *rq = cpu_rq(cpu); 1455 struct rq *rq = cpu_rq(cpu);
1456 unsigned long nr_running = rq->nr_running; 1456 unsigned long nr_running = ACCESS_ONCE(rq->nr_running);
1457 1457
1458 if (nr_running) 1458 if (nr_running)
1459 rq->avg_load_per_task = rq->load.weight / nr_running; 1459 rq->avg_load_per_task = rq->load.weight / nr_running;