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

2022-07-01 Thread Robin Murphy
On 2022-07-01 12:33, John Garry wrote: On 01/07/2022 04:56, Feng Tang wrote: inclination. ok, what you are saying sounds reasonable. I just remember that when we analyzed the longterm aging issue that we concluded that the FQ size and its relation to the magazine size was a factor and this ch

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

2022-07-01 Thread John Garry via iommu
On 01/07/2022 04:56, Feng Tang wrote: inclination. ok, what you are saying sounds reasonable. I just remember that when we analyzed the longterm aging issue that we concluded that the FQ size and its relation to the magazine size was a factor and this change makes me a little worried about new

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

2022-06-30 Thread Feng Tang
Hi John, On Thu, Jun 30, 2022 at 11:52:18AM +0100, John Garry wrote: > > > > > > > > >    [    4.319253] iommu: Adding device :06:00.2 to group 5 > > > > >    [    4.325869] iommu: Adding device :20:01.0 to group 15 > > > > >    [    4.332648] iommu: Adding device :20:02.0 to group 16

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 get 2048 bytes from kmalloc, ca

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

2022-06-30 Thread John Garry via iommu
   [    4.319253] iommu: Adding device :06:00.2 to group 5    [    4.325869] iommu: Adding device :20:01.0 to group 15    [    4.332648] iommu: Adding device :20:02.0 to group 16    [    4.338946] swapper/0 invoked oom-killer: gfp_mask=0x6040c0(GFP_KERNEL|__GFP_COMP), nodemask=(null

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

2022-06-30 Thread Robin Murphy
On 2022-06-30 10:37, John Garry wrote: On 30/06/2022 10:02, 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 get 2048 bytes from kmalloc, causi

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

2022-06-30 Thread John Garry via iommu
On 30/06/2022 10:02, 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 get 2048 bytes from kmalloc, causing around 1KB waste. And in some exstre

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

2022-06-30 Thread Robin Murphy
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 get 2048 bytes from kmalloc, causing around 1KB waste. And in some exstreme case, the memory wasted can trigger OOM