]> git.baikalelectronics.ru Git - kernel.git/commit
Improve perf related BPF tests (sample_freq issue)
authorMykola Lysenko <mykolal@fb.com>
Tue, 8 Mar 2022 20:04:47 +0000 (12:04 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 9 Mar 2022 01:39:28 +0000 (17:39 -0800)
commit2f648ff5d09754ee70d6a7c873206d8332d0d0ea
treef3342707679848d8525ab111ca9c4f3b7870cfdf
parent8651a652e93407515baf220bf54a3608537aa84f
Improve perf related BPF tests (sample_freq issue)

Linux kernel may automatically reduce kernel.perf_event_max_sample_rate
value when running tests in parallel on slow systems. Linux kernel checks
against this limit when opening perf event with freq=1 parameter set.
The lower bound is 1000. This patch reduces sample_freq value to 1000
in all BPF tests that use sample_freq to ensure they always can open
perf event.

Signed-off-by: Mykola Lysenko <mykolal@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220308200449.1757478-2-mykolal@fb.com
tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
tools/testing/selftests/bpf/prog_tests/find_vma.c
tools/testing/selftests/bpf/prog_tests/perf_branches.c
tools/testing/selftests/bpf/prog_tests/perf_link.c