Re: [patch] x86: improved memory barrier implementation

Linus Torvalds
2007-09-28T16:15:51Z

On Fri, 28 Sep 2007, Alan Cox wrote:
>
> However
> - You've not shown the patch has any performance gain

It would be nice to see this.

> - You've probably broken Pentium Pro

Probably not a big deal, but yeah, we should have that broken-ppro option.

> - and for modern processors its still not remotely clear your patch is
> correct because of NT stores.

This one I disagree with. The *old* code doesn't honor NT stores *either*.

The fact is, if you use NT stores and then depend on ordering, it has
nothing what-so-ever to do with spinlocks or smp_[rw]mb. You need to use
the DMA barriers (ie the non-smp ones).

The non-temporal stores should be basically considered to be "IO", not any
normal memory operation.

Linus