Re: [RFC 05/13] x86/mm: Add barriers and document switch_mm-vs-flush synchronization

From: Andy Lutomirski
Date: Thu Jun 09 2016 - 13:24:47 EST


On Fri, Jun 3, 2016 at 10:42 AM, Nadav Amit <nadav.amit@xxxxxxxxx> wrote:
> Following this patch, if (current->active_mm != mm), flush_tlb_page() still
> doesnât call smp_mb() before checking mm_cpumask(mm).
>
> In contrast, flush_tlb_mm_range() does call smp_mb().
>
> Is there a reason for this discrepancy?

Not that I can remember. Is the remote flush case likely to be racy?

--Andy