selftests/bpf: Fixes and improvements for libarena
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 6 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | selftests/bpf: libarena: Normalize SPDX headers across filestools/ tools/ tools/ +2 more | +7 | 0 replies | Applied |
| 2/6 | selftests/bpf: libarena: Inline nonatomic bitmap operationstools/ tools/ | +26 | 0 replies | Applied |
| 3/6 | selftests/bpf: libarena: Disable IRQs during allocationtools/ | +22 | 1 reply | Applied |
| 4/6 | selftests/bpf: libarena: Add calloc() calltools/ tools/ tools/ | +46 | 0 replies | Applied |
| 5/6 | selftests/bpf: libarena: Add a benchmark for malloc()/calloc()tools/ tools/ tools/ +3 more | +334 | 0 replies | Applied |
| 6/6 | selftests/bpf: libarena: Optimize and make public arena_memsettools/ tools/ | +56 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] selftests/bpf: Fixes and improvements for libarena
This patchset addresses issues and feature gaps in libarena's existing code, and optimizes some common code paths.
Patch 1 fixes up an inconsistency in the SPDX tags.
Patch 2 incorporates a followup patch for bitmaps that inlines the nonatomic versions of the set/clear/test operations. Patch 3 makes it safe to use the arena allocator under IRQ reentrancy. Ensuring the allocator is correct under NMIs will be addressed in a subsequent patch because it is a larger change.
Patches 4 to 6 add a calloc() interface for the allocator, along with a benchmark that is useful for quickly finding obvious regressions during development.
Emil Tsalapatis (6):
selftests/bpf: libarena: Normalize SPDX headers across files selftests/bpf: libarena: Inline nonatomic bitmap operations selftests/bpf: libarena: Disable IRQs during allocation selftests/bpf: libarena: Add calloc() call selftests/bpf: libarena: Add a benchmark for malloc()/calloc() selftests/bpf: libarena: Optimize and make public arena_memset
tools/testing/selftests/bpf/Makefile | 18 +- tools/testing/selftests/bpf/bench.c | 6 + .../selftests/bpf/benchs/bench_libarena.c | 210 ++++++++++++++++++ .../bpf/benchs/run_bench_libarena.sh | 31 +++ tools/testing/selftests/bpf/libarena/Makefile | 31 ++- .../bpf/libarena/benchs/bench_malloc.bpf.c | 51 +++++ .../libarena/include/bpf_arena_spin_lock.h | 2 +- .../bpf/libarena/include/bpf_atomic.h | 2 +- .../bpf/libarena/include/bpf_may_goto.h | 1 + .../bpf/libarena/include/libarena/bitmap.h | 30 ++- .../bpf/libarena/include/libarena/common.h | 71 ++++++ .../bpf/libarena/selftests/test_bitmap.bpf.c | 3 + .../selftests/bpf/libarena/src/asan.bpf.c | 21 +- .../selftests/bpf/libarena/src/bitmap.bpf.c | 18 -- .../selftests/bpf/libarena/src/buddy.bpf.c | 44 ++-- .../selftests/bpf/libarena/src/common.bpf.c | 27 ++- 16 files changed, 489 insertions(+), 77 deletions(-) create mode 100644 tools/testing/selftests/bpf/benchs/bench_libarena.c create mode 100755 tools/testing/selftests/bpf/benchs/run_bench_libarena.sh create mode 100644 tools/testing/selftests/bpf/libarena/benchs/bench_malloc.bpf.c
Signature · 1 line
2.54.0