aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2023-12-21 19:17:34 -0800
committerAlexei Starovoitov <[email protected]>2024-01-03 21:08:25 -0800
commit9beda16c257d55213f70adee2f16d7f13a8502e1 (patch)
tree808b110d7b573d9567de037bfad6783898857d6c /tools/perf/scripts/python
parent417fa6d163df6f13fb2cfad5132eff354c8a472e (diff)
bpf: Avoid unnecessary extra percpu memory allocation
Currently, for percpu memory allocation, say if the user requests allocation size to be 32 bytes, the actually calculated size will be 40 bytes and it further rounds to 64 bytes, and eventually 64 bytes are allocated, wasting 32-byte memory. Change bpf_mem_alloc() to calculate the cache index based on the user-provided allocation size so unnecessary extra memory can be avoided. Suggested-by: Hou Tao <[email protected]> Acked-by: Hou Tao <[email protected]> Signed-off-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions