All of lore.kernel.org
 help / color / mirror / Atom feed
* dma_opt_mapping_size returns way too low sizes when using IOMMU
@ 2026-08-17  8:36 Christoph Hellwig
  2026-08-17  9:12 ` John Garry
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2026-08-17  8:36 UTC (permalink / raw)
  To: Marek Szyprowski, Robin Murphy, Joerg Roedel, Will Deacon,
	John Garry, iommu, linux-nvme

Hi all,

I got reports that NVMe devices were arbitrarily limited to 128kiB
transfers in recent kernel.  It turns out that this only happens when
using an IOMMU and is caused by iommu_dma_opt_mapping_size returning
iova_rcache_range(), which is defined as follows:

unsigned long iova_rcache_range(void)
{
	return PAGE_SIZE << (IOVA_RANGE_CACHE_MAX_SIZE - 1);
}

and thus indeed hardcodes a 128kiB return on 4k page size architectures.

Both the NVMe performance numbers and common sense suggest that this
is NOT the optimal DMA mapping granularity.  Can we pick a saner value
for iommu_dma_opt_mapping_size that does not restrict common I/O sizes?


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-17 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17  8:36 dma_opt_mapping_size returns way too low sizes when using IOMMU Christoph Hellwig
2026-08-17  9:12 ` John Garry
2026-08-17  9:18   ` Christoph Hellwig
2026-08-17 10:11     ` John Garry
2026-08-17 17:04       ` Robin Murphy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.