Kernelspace C11 atomics for MIPS
Juli Mallett
jmallett at FreeBSD.org
Tue Jun 4 03:55:26 UTC 2013
On Mon, Jun 3, 2013 at 7:45 PM, Adrian Chadd <adrian at freebsd.org> wrote:
> Speaking of this; any idea why the SYNC operators have 8 NOPs following
> them?
>
> I noticed that when going through disassemblies of various mips24k .o
> files.
>
To drain the pipeline on certain deficient (and mostly older) CPUs by way
of guesswork and a little vague magic. Most CPUs we support, I would
guess, do not need this, and it continues to exist solely for hysterical
reasons.
I've certainly gotten rid of them and some other cargo cult synchronization
on Octeon for testing and had it survive under considerable load, and
occasionally with some slight speedups (for some more commonly-used or
slower things than Just a Bunch Of NOPs.)
The trouble is that proving they aren't necessary requires being rigorous
and careful in understanding documentation and errata, and FUD about their
possible necessity is somewhat-intimidating. It's not an easy kind of
corruption/unreliability/etc., to prove the lack of empirically.
Juli.
More information about the freebsd-arch
mailing list