From: Andrii Nakryiko Date: Wed, 13 Nov 2024 21:51:10 +0000 (-0800) Subject: Merge branch 'bpf-range_tree-for-bpf-arena' X-Git-Tag: microblaze-v6.16~600^2~7 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=379d5ee624eda6a897d9e1f7f88c68ea482bd5fa;p=linux-2.6-microblaze.git Merge branch 'bpf-range_tree-for-bpf-arena' Alexei Starovoitov says: ==================== bpf: range_tree for bpf arena From: Alexei Starovoitov Introduce range_tree (interval tree plus rbtree) to track unallocated ranges in bpf arena and replace maple_tree with it. This is a step towards making bpf_arena|free_alloc_pages non-sleepable. The previous approach to reuse drm_mm to replace maple_tree reached dead end, since sizeof(struct drm_mm_node) = 168 and sizeof(struct maple_node) = 256 while sizeof(struct range_node) = 64 introduced in this patch. Not only it's smaller, but the algorithm splits and merges adjacent ranges. Ultimate performance doesn't matter. The main objective of range_tree is to work in context where kmalloc/kfree are not safe. It achieves that via bpf_mem_alloc. ==================== Link: https://patch.msgid.link/20241108025616.17625-1-alexei.starovoitov@gmail.com Signed-off-by: Andrii Nakryiko --- 379d5ee624eda6a897d9e1f7f88c68ea482bd5fa