Re: [PATCH v2] swiotlb: introduce Kconfig option for compile-time default pool size

Marek Szyprowski <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.documentation
Message-ID <[email protected]>
On 02.07.2026 16:09, [email protected] wrote:
> From: Jagadeesh Pagadala <[email protected]>
>
> The SWIOTLB bounce buffer pool size is hardcoded at 64 MB via
> IO_TLB_DEFAULT_SIZE with no compile-time knob to adjust it. On
> memory-constrained embedded or mobile platforms equipped with a
> hardware IOMMU (e.g., ARM SMMU) covering most DMA-capable devices,
> reserving 64 MB at boot is unnecessarily wasteful — the SWIOTLB is
> only exercised for devices that bypass the IOMMU or have restricted
> DMA address ranges.
>
> Introduce CONFIG_SWIOTLB_DEFAULT_SIZE_MB, an integer Kconfig option
> (range 1–64 MB, default 64) that allows platforms to set a smaller
> compile-time default. IO_TLB_DEFAULT_SIZE is updated to derive from
> this value when CONFIG_SWIOTLB is enabled, preserving the existing
> 64 MB default when the option is not configured.
>
> The runtime "swiotlb=<nslabs>" kernel parameter override remains
> fully supported and takes precedence over the compile-time default.
>
> Signed-off-by: Jagadeesh Pagadala <[email protected]>
> Signed-off-by: Bibek Kumar Patro <[email protected]>

Applied to dma-mapping-for-next, thanks!

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.