diff options
| author | Donggeun Yoo <donggeunyoo.kernel@gmail.com> | 2026-09-24 19:23:21 +0900 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-09-24 14:24:52 +0000 |
| commit | 3422808f4e959266ea7790101ac90b8341f48226 (patch) | |
| tree | b4c1f3429aa6f6e4dfb178c39ae2786165d031ad /tools/perf/scripts/python/task-analyzer.py | |
| parent | c3a66e5f5bab3912e9f84223c5a982bf4333d5a1 (diff) | |
| download | linux-next-3422808f4e959266ea7790101ac90b8341f48226.tar.gz linux-next-3422808f4e959266ea7790101ac90b8341f48226.zip | |
selftests/bpf: Test per-cpu initialization of a BPF_F_CPU created element
The existing cpu_flag subtests always prime a key with BPF_F_ALL_CPUS
before any BPF_F_CPU write, so the create path is never covered.
Add a subtest that creates the element with BPF_F_CPU on a map with
max_entries 1, so the key can only reuse the element the previous key
released, and check that the CPUs the update did not name read back
zero. Run it for PERCPU_HASH preallocated and BPF_F_NO_PREALLOC,
whose per-cpu areas come from different allocators, and for
LRU_PERCPU_HASH.
Under BPF_F_NO_PREALLOC the reuse is only guaranteed on the cpu that
ran the delete, so pin the thread across the pair, and name a cpu other
than that one in map_flags.
Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20260924102321.2120434-3-donggeunyoo.kernel@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
