Re: [RFC][PATCH]: x86: clarify/fix no-op barriers for text_poke_bp()

From: Peter Zijlstra
Date: Mon Jul 31 2017 - 11:04:44 EST


On Mon, Jul 31, 2017 at 10:23:23AM -0400, Steven Rostedt wrote:
> > - smp_wmb();
>
> Heh, I think this was a "lets not leak bp_patching_in_progress" out of
> this function. But I don't see any harm if it happens.
>
> As this function was a *very* slow path, that smp_wmb() was a "it's not
> really needed, but it wont hurt anything to slap it in there just in
> case".

Well, this is x86, its a NO-OP. The only reason to write barriers like
that is for documentation purposes and in that regard is confuses. IOW
has negative value.