aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorYuanyuan Zhong <yzhong@purestorage.com>2023-06-29 15:32:48 -0600
committerLeon Romanovsky <leon@kernel.org>2023-07-12 15:06:43 +0300
commit52b4bdd28c861e7331543f4b5a0853b80c9fd3fa (patch)
treea5983b857e69bb4897f35959365d14befe790e2f /tools/perf/scripts/python/libxed.py
parentLinux 6.5-rc1 (diff)
downloadlinux-52b4bdd28c861e7331543f4b5a0853b80c9fd3fa.tar.gz
linux-52b4bdd28c861e7331543f4b5a0853b80c9fd3fa.zip
RDMA/mlx5: align MR mem allocation size to power-of-two
The MR memory allocation requests extra bytes to guarantee that there is enough space to find the memory aligned to MLX5_UMR_ALIGN. For power-of-two sizes, the alignment can be guaranteed by kmalloc() according to commit 59bb47985c1d ("mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two)"). So if target alignment is power-of-two and adding the extra bytes crosses a power-of-two boundary, use the next power-of-two as the allocation size. Signed-off-by: Yuanyuan Zhong <yzhong@purestorage.com> Link: https://lore.kernel.org/r/20230629213248.3184245-2-yzhong@purestorage.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions