summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec
diff options
context:
space:
mode:
authorHui Zhu <zhuhui@kylinos.cn>2026-10-09 14:26:37 +0800
committerKumar Kartikeya Dwivedi <memxor@gmail.com>2026-10-19 03:21:54 +0200
commit0f9b1e9ef584522b645a97eff8d1c8d0dcab3afb (patch)
treeec6c64ba37d9fee376bb347d201261800138e205 /rust/kernel/alloc/kvec
parent27dc4fc4ae7b01efb68561f98c5f373e55fb71c2 (diff)
selftests/bpf: Add bpf_proactive_reclaim test
bpf_proactive_reclaim() performs one bounded reclaim pass per call and, unlike a write to memory.reclaim, does not retry until the goal is reached. Charge 32 MiB of page cache to a cgroup, ask for all of it in one call, and check that the result is positive but well below the request: one pass is capped at MEMCG_CHARGE_BATCH pages, far short of 32 MiB on both 4K and 64K page kernels. The test deliberately covers only the kfunc itself. A full example of the intended asynchronous use, where a BPF program watches one cgroup's workingset refaults and reclaims another one from bpf_wq callbacks, is maintained out of tree at [1], released under GPLv2. Add CONFIG_MEMCG to the config fragment, without which mm/bpf_memcontrol.c is not built at all. [1] https://github.com/teawater/memcg-async-reclaim Signed-off-by: Hui Zhu <zhuhui@kylinos.cn> Reviewed-by: Barry Song <baohua@kernel.org> Link: https://lore.kernel.org/bpf/20261009062637.176005-1-hui.zhu@linux.dev Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions