Merge branch 'bpf-add-memory-usage-for-arena-and-selftest'

Jiayuan Chen says:

====================
bpf: Add memory usage for arena and selftest

arena is the only map type whose map_mem_usage() still returns 0, so
bpftool and fdinfo always show 0 memlock for it no matter how many pages
it holds. This series adds the accounting, runs the arena selftests
serially so they don't OOM a small CI VM, and adds a test for it.

v1 -> v2:
- split the scratch_page -> arena refactor into a prep patch (no
  functional change)
- use WRITE_ONCE() for nr_pages to pair with the lockless reader
- reword the "run serially" commit message
- selftest: alloc prog returns 0 so the failure check is reached

v1: https://lore.kernel.org/bpf/20260716142746.8794-1-jiayuan.chen@linux.dev/
====================

Link: https://patch.msgid.link/20260717114117.350851-1-jiayuan.chen@linux.dev
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
Kumar Kartikeya Dwivedi 2026-07-19 17:56:11 +02:00
commit fa44402059
No known key found for this signature in database
GPG key ID: 472D377B63542F83
11 changed files with 186 additions and 19 deletions