Re: [PATCH] dma/pool: do not complain if DMA pool is not allocated

From: Christoph Hellwig
Date: Thu Aug 11 2022 - 03:49:54 EST


On Thu, Aug 04, 2022 at 07:01:28PM +0800, Baoquan He wrote:
> After attempts, I realize it's time to let one zone DMA or DMA32 cover
> the whole low 4G memory on x86_64. That's the real fix. The tiny 16M DMA
> on 64bit system is root cause.

We can't for two reasons:

- people still use ISA cards on x86, including the industrial PC104
version, and we still have drivers that rely on it
- we still have PCI and PCIe devices with small than 26, 28, 30 and 31
bit addressing limitations

We could try to get the 24-bit DMA entirely out of the zone allocator
and only fill a genpool at bootmem time. But that requires fixing up
all the direct users of page and slab allocations on it first (of
which 90+% look bogus, with the s390 drivers being the obvious
exception).

Or we could make 'low' memory a special ZONE_MOVABLE and have an
allocator that can search by physical address an replace ZONE_DMA
and ZONE_DMA32 with that. Which sounds like a nice idea to me, but
is pretty invasive.