Re: [PATCH v6 6/8] dma: swiotlb: Centralize memory-encryption pool sizing
From: Aneesh Kumar K . V
Date: Thu Nov 12 2026 - 05:47:11 EST
Kohei Enju <enju.kohei@xxxxxxxxxxx> writes:
> Hi Aneesh,
>
> On 11/01 09:47, Aneesh Kumar K.V wrote:
> [...]
>> >
>> > Hi Aneesh,
>> >
[ ... 35 lines skipped ... ]
> Overall, I would prefer the dynamic sizing approach. However, I believe
> the initial pool size still matters.
>
> Also, as Catalin pointed out earlier in the following message:
>
> https://lore.kernel.org/all/ann6noRzoPLL9kDY@xxxxxxx/
>
> the arm64 adjustment also reduces the target size used for dynamic
> pool allocation, since both the initial pool and dynamic allocation
> currently use default_nslabs.
>
> I am testing the patch below to decouple the initial pool size from the
> dynamic allocation target. It adds swiotlb_adjust_initial_size() for
> callers that only want to reduce the initial allocation, while keeping
> the existing swiotlb_adjust_size() semantics for callers that want to
> adjust both sizes.
>
Should we instead update the logic so that reducing the swiotlb size
leaves the dynamic allocation size unchanged, while increasing it also
bumps the dynamic allocation size?
-aneesh