Re: [PATCH] iommu/iova: Separate out rcache init

2022-01-28 Thread Robin Murphy
On 2022-01-28 11:32, John Garry wrote: On 26/01/2022 17:00, Robin Murphy wrote: As above, I vote for just forward-declaring the free routine in iova.c and keeping it entirely private. BTW, speaking of forward declarations, it's possible to remove all the forward declarations in iova.c now tha

Re: [PATCH] iommu/iova: Separate out rcache init

2022-01-28 Thread John Garry via iommu
On 26/01/2022 17:00, Robin Murphy wrote: As above, I vote for just forward-declaring the free routine in iova.c and keeping it entirely private. BTW, speaking of forward declarations, it's possible to remove all the forward declarations in iova.c now that the FQ code is gone - but with a good

Re: [PATCH] iommu/iova: Separate out rcache init

2022-01-26 Thread John Garry via iommu
Hi Robin, Signed-off-by: John Garry Mangled patch? (no "---" separator here) hmm... not sure. As an experiment, I just downloaded this patch from lore.kernel.org and it applies ok. Overall this looks great, just a few comments further down... ... +} +EXPORT_SYMBOL_GPL(iova_domain_i

Re: [PATCH] iommu/iova: Separate out rcache init

2022-01-26 Thread Robin Murphy
On 2022-01-26 13:55, John Garry wrote: Currently the rcache structures are allocated for all IOVA domains, even if they do not use "fast" alloc+free interface. This is wasteful of memory. In addition, fails in init_iova_rcaches() are not handled safely, which is less than ideal. Make "fast" use

[PATCH] iommu/iova: Separate out rcache init

2022-01-26 Thread John Garry via iommu
Currently the rcache structures are allocated for all IOVA domains, even if they do not use "fast" alloc+free interface. This is wasteful of memory. In addition, fails in init_iova_rcaches() are not handled safely, which is less than ideal. Make "fast" users call a separate rcache init explicitly