linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix dma coherent pool sizing
@ 2022-08-17  6:06 Christoph Hellwig
  2022-08-17  6:06 ` [PATCH 1/3] dma-pool: factor out a calculate_pool_size helper Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Christoph Hellwig @ 2022-08-17  6:06 UTC (permalink / raw)
  To: iommu, Marek Szyprowski, Robin Murphy
  Cc: Michal Hocko, David Rientjes, linux-kernel

Hi all

Michal pointed out that the sizing of the dma coherent pools is bonkers
as it uses the total memory to size the pool for each zone, which leads
to comically larger zones for the 16-MB ZONE_DMA on x86, which tends
leads to allocation failure warnings.  This series switches to sizing
the ZONE_DMA and ZONE_DMA32 pools based on the number of pages that
actually reside in those zones instead.

Diffstat:
 pool.c |   65 +++++++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 41 insertions(+), 24 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread
* fix dma coherent pool sizing
@ 2022-08-22  6:12 Christoph Hellwig
  2022-08-22  6:12 ` [PATCH 3/3] dma-pool: limit DMA and DMA32 zone size pools Christoph Hellwig
  0 siblings, 1 reply; 17+ messages in thread
From: Christoph Hellwig @ 2022-08-22  6:12 UTC (permalink / raw)
  To: iommu, Marek Szyprowski, Robin Murphy
  Cc: Michal Hocko, David Rientjes, linux-kernel

Hi all

Michal pointed out that the sizing of the dma coherent pools is bonkers
as it uses the total memory to size the pool for each zone, which leads
to comically larger zones for the 16-MB ZONE_DMA on x86, which tends
leads to allocation failure warnings.  This series switches to sizing
the ZONE_DMA and ZONE_DMA32 pools based on the number of pages that
actually reside in those zones instead.

Diffstat:
 pool.c |   56 +++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 33 insertions(+), 23 deletions(-)

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

end of thread, other threads:[~2022-08-22 14:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17  6:06 fix dma coherent pool sizing Christoph Hellwig
2022-08-17  6:06 ` [PATCH 1/3] dma-pool: factor out a calculate_pool_size helper Christoph Hellwig
2022-08-17 12:32   ` Robin Murphy
2022-08-21 10:41     ` Christoph Hellwig
2022-08-17  6:06 ` [PATCH 2/3] dma-pool: don't return errors from dma_atomic_pool_init Christoph Hellwig
2022-08-17 12:36   ` Robin Murphy
2022-08-17  6:06 ` [PATCH 3/3] dma-pool: limit DMA and DMA32 zone size pools Christoph Hellwig
2022-08-17 12:50   ` Robin Murphy
2022-08-21 10:43     ` Christoph Hellwig
2022-08-17 12:53   ` Michal Hocko
2022-08-21 10:44     ` Christoph Hellwig
2022-08-22  8:41       ` Michal Hocko
2022-08-22 11:14         ` Christoph Hellwig
2022-08-22 12:09           ` Michal Hocko
2022-08-22 12:27             ` Christoph Hellwig
2022-08-22 14:21               ` Michal Hocko
2022-08-22  6:12 fix dma coherent pool sizing Christoph Hellwig
2022-08-22  6:12 ` [PATCH 3/3] dma-pool: limit DMA and DMA32 zone size pools Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).