Re: [PATCH] arm64: swiotlb: Don’t shrink default buffer when bounce is forced

Marek Szyprowski m.szyprowski at samsung.com
Wed Mar 4 02:00:30 PST 2026


On 06.02.2026 07:11, Aneesh Kumar K.V wrote:
> Catalin Marinas <catalin.marinas at arm.com> writes:
>> On Tue, Jan 20, 2026 at 12:31:02PM +0530, Aneesh Kumar K.V (Arm) wrote:
>>> arm64 reduces the default swiotlb size (for unaligned kmalloc()
>>> bouncing) when it detects that no swiotlb bouncing is needed.
>>>
>>> If swiotlb bouncing is explicitly forced via the command line
>>> (swiotlb=force), this heuristic must not apply. Add a swiotlb helper to
>>> query the forced-bounce state and use it to skip the resize when
>>> bouncing is forced.
>> I think the logic you proposed in reply to Robin might work better but
>> have you actually hit a problem that triggered this patch? Do people
>> passing swiotlb=force expect a specific size for the buffer?
>>
> This issue was observed while implementing swiotlb for a trusted device.
> I was testing the protected swiotlb space using the swiotlb=force
> option, which causes the device to use swiotlb even in protected mode.
> As per Robin, an end user using the swiotlb=force option will also
> specify a custom swiotlb size

Does the above mean that it works fine when user provides both 
swiotlb=force and custom swiotlb size, so no changes in the code are 
actually needed?

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland




More information about the linux-arm-kernel mailing list