summaryrefslogtreecommitdiff
path: root/kernel/bpf/stackmap.c
diff options
context:
space:
mode:
authorYafang Shao <laoar.shao@gmail.com>2023-03-05 15:45:59 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-03-07 20:33:42 +0300
commit41d5941e7f9a27f3d28220f08b843e8d87df1be4 (patch)
tree4e805c69a2180983bc0c958afaa8376bf5d188f8 /kernel/bpf/stackmap.c
parent90a5527d7686d3ebe0dd2a831356a6c7d7dc31bc (diff)
downloadlinux-41d5941e7f9a27f3d28220f08b843e8d87df1be4.tar.xz
bpf: lpm_trie memory usage
trie_mem_usage() is introduced to calculate the lpm_trie memory usage. Some small memory allocations are ignored. The inner node is also ignored. The result as follows, - before 10: lpm_trie flags 0x1 key 8B value 8B max_entries 65536 memlock 1048576B - after 10: lpm_trie flags 0x1 key 8B value 8B max_entries 65536 memlock 2291536B Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Link: https://lore.kernel.org/r/20230305124615.12358-3-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/stackmap.c')
0 files changed, 0 insertions, 0 deletions