Re: [RFC][PATCH 1/5] mm: Rework {set,clear,mm}_tlb_flush_pending()

From: Benjamin Herrenschmidt
Date: Tue Aug 01 2017 - 22:08:21 EST


On Wed, 2017-08-02 at 00:59 +0200, Peter Zijlstra wrote:
> > PowerPC for example uses PTESYNC before the TBLIE, so does a SYNC after
> > work? Ben?
> > From what I gather it is not. You have TLBSYNC for it. So the good news

tlbsync is pretty much a nop these days. ptesync is a strict superset
of sync and we have it after every tlbie.

> is that PPC-radix does all that and is fully serialized on the tlb
> flush. Not sure for the PPC-hash case.
>
> At the same time, smp_mb() is not sufficient on ARM either, they need a
> DSB barrier on both ends.
>
> So are we going to mandate tlb flush implementations are completely
> ordered ?

Cheers,
Ben.