selftests/bpf: perf_link: avoid failures in concurrent mode#11296
selftests/bpf: perf_link: avoid failures in concurrent mode#11296kernel-patches-daemon-bpf[bot] wants to merge 1 commit intobpf-next_basefrom
Conversation
|
Upstream branch: 4faa189 |
69a44ca to
f264dc7
Compare
|
Upstream branch: 748f9c6 |
aa0e625 to
cd34a92
Compare
f264dc7 to
59120bd
Compare
|
Upstream branch: 6dd780f |
cd34a92 to
b8d4f03
Compare
|
Upstream branch: 6dd780f |
b8d4f03 to
f6b1f63
Compare
59120bd to
94aca0b
Compare
|
Upstream branch: 099bded |
f6b1f63 to
2e7bee2
Compare
94aca0b to
980a66f
Compare
|
Upstream branch: bd2e02e |
2e7bee2 to
79bf274
Compare
980a66f to
026b5c1
Compare
|
Upstream branch: bd2e02e |
79bf274 to
811c04b
Compare
026b5c1 to
b72a510
Compare
|
Upstream branch: 0c55d48 |
811c04b to
3202097
Compare
b72a510 to
ebefa82
Compare
perf_link creates a system-wide perf event pinned to CPU 0 (pid=-1, cpu=0) and also pins the test thread to CPU 0. Under concurrent selftests this can lead to cross-test interference and CPU 0 contention, making the test flaky. Create a per-task perf event instead (pid=0, cpu=-1) and drop CPU pinning from burn_cpu(). Use barrier() to prevent the burn loop from being optimized away. Drop the serial_ prefix so the test can run in parallel. Also remove the stale TODO comment. Tested: ./test_progs -t perf_link -vv ./test_progs -j$(nproc) -t perf_link -vv for i in $(seq 1 50); do ./test_progs -j$(nproc) -t perf_link; done Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com> Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
|
Upstream branch: e95e85b |
3202097 to
593f9c3
Compare
Pull request for series with
subject: selftests/bpf: perf_link: avoid failures in concurrent mode
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1061795