On Thu, 24 Oct 2019 at 20:12, Samudrala, Sridhar <sridhar.samudrala@xxxxxxxxx> wrote: > [...] > > With mitigations ON > ------------------- > Samples: 6K of event 'cycles', 4000 Hz, Event count (approx.): 5646512726 > bpf_prog_3c8251c7e0fef8db bpf_prog_3c8251c7e0fef8db [Percent: local period] > 45.05 push %rbp > 0.02 mov %rsp,%rbp > 0.03 sub $0x8,%rsp > 22.09 push %rbx [...] > > Do you see any issues with this data? With mitigations ON push %rbp and push %rbx overhead seems to > be pretty high. That's sample skid from the retpoline thunk when entring the XDP program. Pretty expensive push otherwise! :-) Another thought; Disclaimer: I'm no spectrev2 expert, and probably not getting the mitigations well enough. So this is me trying to swim at the deep end! Would it be possible to avoid the retpoline when entering the XDP program. At least for some XDP program that can be proved "safe"? If so, PeterZ's upcoming static_call could be used from the driver side. Björn