From: Alexei Starovoitov Date: Sun, 26 Mar 2023 02:52:52 +0000 (-0700) Subject: Merge branch 'bpf: Use bpf_mem_cache_alloc/free in bpf_local_storage' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8d2759608c1f39fc2d60702bf0a7421be246d209;p=linux.git Merge branch 'bpf: Use bpf_mem_cache_alloc/free in bpf_local_storage' Martin KaFai Lau says: ==================== From: Martin KaFai Lau This set is a continuation of the effort in using bpf_mem_cache_alloc/free in bpf_local_storage [1] Major change is only using bpf_mem_alloc for task and cgrp storage while sk and inode stay with kzalloc/kfree. The details is in patch 2. [1]: https://lore.kernel.org/bpf/20230308065936.1550103-1-martin.lau@linux.dev/ v3: - Only use bpf_mem_alloc for task and cgrp storage. - sk and inode storage stay with kzalloc/kfree. - Check NULL and add comments in bpf_mem_cache_raw_free() in patch 1. - Added test and benchmark for task storage. v2: - Added bpf_mem_cache_alloc_flags() and bpf_mem_cache_raw_free() to hide the internal data structure of the bpf allocator. - Fixed a typo bug in bpf_selem_free() - Simplified the test_local_storage test by directly using err returned from libbpf ==================== Signed-off-by: Alexei Starovoitov --- 8d2759608c1f39fc2d60702bf0a7421be246d209