On 12/15/2023 8:12 AM, Yonghong Song wrote: > 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 <houtao1@xxxxxxxxxx> > Signed-off-by: Yonghong Song <yonghong.song@xxxxxxxxx> Acked-by: Hou Tao <houtao1@xxxxxxxxxx>