[PATCH 1/2] perf: arm_spe: Order padding before publishing AUX head

Leo Yan leo.yan at arm.com
Tue Dec 1 02:34:53 PST 2026


On Tue, Dec 01, 2026 at 09:34:31AM +0000, Will Deacon wrote:

[...]

> > > This looks correct to me, but I wonder if it should be handled by
> > > perf_aux_output_skip() instead? arm_spe_pmu_pad_buf() is called from a
> > > bunch of places in the driver, including in conjunction with
> > > perf_aux_output_end(), which looks like it already has the necessary
> > > memory barrier. So doing it here seems weird inconsistent to me.
> > 
> > As I mentioned in the cover letter, the choice of barrier depends on the
> > CPU memory model and the trace hardware. Perf deliberately leaves that
> > choice to the AUX driver [1].
> 
> No it doesn't. The padding is written using store instructions from the
> CPU, so they are ordered just like every other store instruction.

Okay, I’ll move the barrier into perf_aux_output_skip().

Thanks,
Leo



More information about the linux-arm-kernel mailing list