Skip to content

bpf, x64: optimize JIT's pro/epilogue

Maciej Fijalkowski bpf netdev 1 version Applied

Status from this message: This series was applied to bpf/bpf-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf, x64: drop "pop %rcx" instruction on BPF JIT epiloguearch/x86/net/bpf_jit_comp.c+0 -20 repliesApplied
2/2bpf: x64: do not emit sub/add 0, %rsp when !stack_deptharch/x86/net/bpf_jit_comp.c+23 -100 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/2] bpf, x64: optimize JIT's pro/epilogue

Hi!

This small set can be considered as a followup after recent addition of support for tailcalls in bpf subprograms and is focused on optimizing x64 JIT prologue and epilogue sections.

Turns out the popping tail call counter is not needed anymore and %rsp handling when stack depth is 0 can be skipped.

For longer explanations, please see commit messages.

Thank you,
Maciej

Maciej Fijalkowski (2):
bpf, x64: drop "pop %rcx" instruction on BPF JIT epilogue
bpf: x64: do not emit sub/add 0, %rsp when !stack_depth

 arch/x86/net/bpf_jit_comp.c | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)
Signature · 1 line
2.20.1