diff options
author | 2023-03-05 12:46:06 +0000 | |
---|---|---|
committer | 2023-03-07 09:33:42 -0800 | |
commit | 835f1fca951303930b2c74c5b0abe3c03a3aeadf (patch) | |
tree | 70a044e79a727cec5043247c923170d5d993b77a /scripts/generate_rust_analyzer.py | |
parent | bpf: bloom_filter memory usage (diff) | |
download | linux-rng-835f1fca951303930b2c74c5b0abe3c03a3aeadf.tar.xz linux-rng-835f1fca951303930b2c74c5b0abe3c03a3aeadf.zip |
bpf: cpumap memory usage
A new helper is introduced to calculate cpumap memory usage. The size of
cpu_entries can be dynamically changed when we update or delete a cpumap
element, but this patch doesn't include the memory size of cpu_entry
yet. We can dynamically calculate the memory usage when we alloc or free
a cpu_entry, but it will take extra runtime overhead, so let just put it
aside currently. Note that the size of different cpu_entry may be
different as well.
The result as follows,
- before
48: cpumap name count_map flags 0x4
key 4B value 4B max_entries 64 memlock 4096B
- after
48: cpumap name count_map flags 0x4
key 4B value 4B max_entries 64 memlock 832B
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20230305124615.12358-10-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions