diff options
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 4c7388ef5be7..152828239ef0 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1443,7 +1443,7 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); | |||
1443 | static unsigned long cpu_avg_load_per_task(int cpu) | 1443 | static unsigned long cpu_avg_load_per_task(int cpu) |
1444 | { | 1444 | { |
1445 | struct rq *rq = cpu_rq(cpu); | 1445 | struct rq *rq = cpu_rq(cpu); |
1446 | unsigned long nr_running = rq->nr_running; | 1446 | unsigned long nr_running = ACCESS_ONCE(rq->nr_running); |
1447 | 1447 | ||
1448 | if (nr_running) | 1448 | if (nr_running) |
1449 | rq->avg_load_per_task = rq->load.weight / nr_running; | 1449 | rq->avg_load_per_task = rq->load.weight / nr_running; |