Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb()

From: H. Peter Anvin
Date: Tue Jan 12 2016 - 17:56:24 EST


On 01/12/16 14:21, Michael S. Tsirkin wrote:
>
> OK so I'll have to tweak the test to put something
> on stack to measure the difference: my test tweaks a
> global variable instead.
> I'll try that by tomorrow.
>
> I couldn't measure any difference between mfence and lock+addl
> except in a micro-benchmark, but hey since we are tweaking this,
> let's do the optimal thing.
>

Be careful with this: if it only shows up in a microbenchmark, we may
introduce a hard-to-debug regression for no real benefit.

-hpa