[PATCH v2] arm64: implement support for static call trampolines

Peter Zijlstra peterz at infradead.org
Thu Oct 29 07:44:57 EDT 2020


On Thu, Oct 29, 2020 at 12:32:50PM +0100, Ard Biesheuvel wrote:
> However, as I discussed with Will offline yesterday as well, the
> question that got snowed under is whether we need any of this on arm64
> in the first place. It seems highly unlikely that inline static calls
> are worth it, and even out-of-line static calls are probably not worth
> the hassle as we don't have the retpoline problem.
> 
> So this code should be considered an invitation for discussion, and
> perhaps someone can invent a use case where benchmarks can show a
> worthwhile improvement. But let's not get ahead of ourselves.

So the obvious benefit is not having to do the extra load. Any indirect
call will have to do a load first, which can miss etc.. And yes,
retpoline is a horrible mess as well.

Doing the direct vs indirect saves one I$ miss I suppose, which can be
noticable.

IIRC Steve had benchmarks for the ftrace conversion, which is now
upstream, so that should be simple enough to run.

Steve, remember how to get numbers out of that?



More information about the linux-arm-kernel mailing list