Re: [PATCH] iommu/iova: change IOVA_MAG_SIZE to 127 to save memory

2022-06-30 Thread Feng Tang
Hi Robin, On Thu, Jun 30, 2022 at 10:02:00AM +0100, Robin Murphy wrote: > On 2022-06-30 08:33, Feng Tang wrote: > > kmalloc will round up the request size to power of 2, and current > > iova_magazine's size is 1032 (1024+8) bytes, so each instance > > allocated will g

[PATCH] iommu/iova: change IOVA_MAG_SIZE to 127 to save memory

2022-06-30 Thread Feng Tang
57565] kmalloc-2048 59164KB 59164KB Change IOVA_MAG_SIZE from 128 to 127 to make size of 'iova_magazine' 1024 bytes so that no memory will be wasted. [1]. https://lkml.org/lkml/2019/8/12/266 Signed-off-by: Feng Tang --- drivers/iommu/iova.c | 7 ++- 1 file changed, 6 i

Re: [PATCH] iommu/iova: change IOVA_MAG_SIZE to 127 to save memory

2022-06-30 Thread Feng Tang
   4.355612]  __alloc_pages_nodemask+0x970/0x1030 > > > > >    [    4.355612]  cache_grow_begin+0x7d/0x520 > > > > >    [    4.355612]  fallback_alloc+0x148/0x200 > > > > >    [    4.355612]  kmem_cache_alloc_trace+0xac/0x1f0 > > > > >

[PATCH v2] iommu/iova: change IOVA_MAG_SIZE to 127 to save memory

2022-07-03 Thread Feng Tang
that no memory will be wasted. Signed-off-by: Feng Tang Acked-by: Robin Murphy --- Changelog: since v1: * update commit log per the comments from Robin and John drivers/iommu/iova.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iova.c b/drive