]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
sched/fair: Use __this_cpu_read() in wake_wide()
authorMuchun Song <songmuchun@bytedance.com>
Tue, 21 Apr 2020 14:41:23 +0000 (22:41 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 30 Apr 2020 18:14:41 +0000 (20:14 +0200)
The code is executed with preemption(and interrupts) disabled,
so it's safe to use __this_cpu_write().

Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200421144123.33580-1-songmuchun@bytedance.com
kernel/sched/fair.c

index cd7fd7e2b579a2bef81730f653b7c8f7e4174d6b..46b7bd41573f3e097f34d8c4eef092ef3ef78c62 100644 (file)
@@ -5718,7 +5718,7 @@ static int wake_wide(struct task_struct *p)
 {
        unsigned int master = current->wakee_flips;
        unsigned int slave = p->wakee_flips;
-       int factor = this_cpu_read(sd_llc_size);
+       int factor = __this_cpu_read(sd_llc_size);
 
        if (master < slave)
                swap(master, slave);