On 7/18/24 5:36 PM, Alexei Starovoitov wrote:
On Thu, Jul 18, 2024 at 2:44 PM Yonghong Song <yonghong.song@xxxxxxxxx> wrote:
$ perf record -- ./bench -w3 -d10 -a --nr-batch-iters=4096 private-stack
18.94% bench [k]
16.88% bench bpf_prog_bcf7977d3b93787c_func1 [k] bpf_prog_bcf7977d3b93787c_func1
15.77% bench bpf_trampoline_6442522961 [k]
...
NOTE: I tried 6.4 perf and 6.10 perf, both of which have issues. I will investigate this further.
I tried with perf built with latest bpf-next and with no-private-stack, the issue still
exists. Will debug more.
Try this fix:
https://lore.kernel.org/all/20240714065533.1112616-1-houtao@xxxxxxxxxxxxxxx/
It does fix the problem. The 'perf report' for private-stack flavor:
18.94% bench bpf_prog_71f1b7d5309b304a_bench_trigger_fentry_batch [k] bpf_prog_71f1b7d5309b304a_bench_trigger_fentry_batch
16.50% bench bpf_prog_bcf7977d3b93787c_func1 [k] bpf_prog_bcf7977d3b93787c_func1
15.75% bench bpf_trampoline_6442522961 [k] bpf_trampoline_6442522961
11.72% bench [kernel.vmlinux] [k] migrate_enable
11.63% bench [kernel.vmlinux] [k] __bpf_prog_enter_recur
11.37% bench [kernel.vmlinux] [k] __bpf_prog_exit_recur
6.17% bench [kernel.vmlinux] [k] migrate_disable
3.59% bench bpf_prog_d9703036495d54b0_trigger_driver [k] bpf_prog_d9703036495d54b0_trigger_driver
3.51% bench [kernel.vmlinux] [k] bpf_get_numa_node_id
0.05% bench bench [.] bpf_prog_test_run_opts
btw you were cc-ed on it. your @ fb goes to spam ? ;)
It is in my inbox. Sadly I skipped it since it is for perf system and I focused on
several of my patches in the last few days.