提交 17c891ab 编写于 作者: M Muchun Song 提交者: Peter Zijlstra

sched/fair: Use __this_cpu_read() in wake_wide()

The code is executed with preemption(and interrupts) disabled,
so it's safe to use __this_cpu_write().
Signed-off-by: NMuchun Song <songmuchun@bytedance.com>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200421144123.33580-1-songmuchun@bytedance.com
上级 bf2c59fc
...@@ -5718,7 +5718,7 @@ static int wake_wide(struct task_struct *p) ...@@ -5718,7 +5718,7 @@ static int wake_wide(struct task_struct *p)
{ {
unsigned int master = current->wakee_flips; unsigned int master = current->wakee_flips;
unsigned int slave = p->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) if (master < slave)
swap(master, slave); swap(master, slave);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册