lkml.org 
[lkml]   [2019]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 1/2] Fix: sched/membarrier: p->mm->membarrier_state racy load
On Tue, Sep 3, 2019 at 1:11 PM Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
>
> + cpus_read_lock();
> + for_each_online_cpu(cpu) {

This would likely be better off using mm_cpumask(mm) instead of all
online CPU's.

Plus doing the rcu_read_lock() inside the loop seems pointless. Even
with a lot of cores, it's not going to loop _that_ many times for RCU
latency to be an issue.

Linus

\
 
 \ /
  Last update: 2019-09-03 22:28    [W:0.100 / U:2.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site