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

Peter Zijlstra peterz at infradead.org
Thu Oct 29 07:58:32 EDT 2020


On Thu, Oct 29, 2020 at 11:50:26AM +0000, Mark Rutland wrote:
> Hi Ard,
> 
> On Wed, Oct 28, 2020 at 07:41:14PM +0100, Ard Biesheuvel wrote:
> > Implement arm64 support for the 'unoptimized' static call variety,
> > which routes all calls through a single trampoline that is patched
> > to perform a tail call to the selected function.
> 
> Given the complexity and subtlety here, do we actually need this?

Only if you can get a performance win. The obvious benefit is loosing
the load that's inherent in indirect function calls. The down-side of
the indirect static-call implementation is that it will incur an extra
I$ miss.

So it might be a wash, loose a data load miss, gain an I$ miss.

The direct method (patching the call-site, where possible) would
alleviate that (mostly) and be more of a win.



More information about the linux-arm-kernel mailing list