Web lists-archives.com

Re: Summary of the Arm ports BoF at DC17




On Sun, 2017-09-17 at 12:59 -0700, Vagrant Cascadian wrote:
> On 2017-09-15, Ben Hutchings wrote:
> > On Thu, 2017-09-14 at 03:40 +0100, Steve McIntyre wrote:
> > [...]
> >> There is optional kernel support to trap the exceptions here
> >> and emulate the instructions, but it's really not recommended for
> >> serious use (e.g. on a build machine!).
> > [...]
> >
> > Why is it not recommended?  Terrible performance, or known bugs?
> 
> On arm64 kernels building armhf packages for the reproducible builds
> builders, I'm seeing hundreds or even thousands of kernel log warnings
> per second when building anything that makes use of
> CP15_BARRIER_EMULATION (e.g. anything using ghc):
> 
>   [85740.553537] cp15barrier_handler: 115316 callbacks suppressed
>   [85740.559358] "ghc-pkg" (29572) uses deprecated CP15 Barrier instruction at 0xf5beaa7c
>   [85740.567344] "ghc-pkg" (29572) uses deprecated CP15 Barrier instruction at 0xf5beaa9c
> 
> That *might* be sufficient to actually impact performance; it certainly
> makes it hard to read other kernel log messages on those machines...

I bet it does!

I was a bit surprised to find in the docs that there was no "silently
emulate" option in the proc interface, seems my memory was faulty
there.

But it did remind me that on some platforms writing "2" to
/proc/sys/abi/cp15_barrier will enable hw support for these
instructions, since some platforms do support them even thought they
are deprecated. It's certainly worth investigating what your hardware
supports.

Ian.