On 2024/2/17 21:43, Leon Hwang wrote: > > > On 2024/2/16 10:18, Alexei Starovoitov wrote: [SNIP] >> >> In general that's better, but it feels we can do better >> and avoid passing rax around. >> Just access bpf_tail_call_cnt directly from emit_bpf_tail_call. > Yes, we can do better to avoid passing rax around: > > 1. At prologue, initialise percpu tail_call_cnt. > 2. When tailcall, fetch and increment percpu tail_call_cnt. > > As a result, we can remove pushing/popping rax at anywhere. > > Finally, here's the diff against latest bpf-next with asm to handle > percpu tail_call_cnt: > Hi Alexei, Should I send PATCH v2? May I add "Suggested-by: Alexei Starovoitov <ast@xxxxxxxxxx>" at PATCH v2? Because the key idea, percpu tail_call_cnt, is suggested by you. Thanks, Leon