summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPuranjay Mohan <puranjay@kernel.org>2025-12-22 11:50:16 -0800
committerAlexei Starovoitov <ast@kernel.org>2025-12-23 11:29:59 -0800
commitc336b0b327120052c331f6839ee60069065a7c74 (patch)
tree4e4abd33e4d954f4a9cab7e76a670a43d449a573 /include
parentac1c5bc7c4c7e20e2070e6eaa673fc3e11619dbb (diff)
bpf: arena: populate vm_area without allocating memory
vm_area_map_pages() may allocate memory while inserting pages into bpf arena's vm_area. In order to make bpf_arena_alloc_pages() kfunc non-sleepable change bpf arena to populate pages without allocating memory: - at arena creation time populate all page table levels except the last level - when new pages need to be inserted call apply_to_page_range() again with apply_range_set_cb() which will only set_pte_at() those pages and will not allocate memory. - when freeing pages call apply_to_existing_page_range with apply_range_clear_cb() to clear the pte for the page to be removed. This doesn't free intermediate page table levels. Signed-off-by: Puranjay Mohan <puranjay@kernel.org> Link: https://lore.kernel.org/r/20251222195022.431211-2-puranjay@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions