Re: [PATCH bpf-next v2 2/6] bpf: Avoid unnecessary extra percpu memory allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux