Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 3 Sep 2019 13:27:23 -0700 | Subject | Re: [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
| |