Re: [RFC] mm: Allow ZONE_DMA32 to be disabled via kernel command line

From: Christoph Hellwig
Date: Fri Jan 27 2023 - 02:07:14 EST


On Thu, Jan 26, 2023 at 10:52:43PM -0800, H. Peter Anvin wrote:
> >If people want ZONE_DMA32 to go away we need something to replace
> >it first, like a large enough CMA region in the 32-bit addressable
> >range.
>
> Not to mention all kinds of odd masks like 30, 31, 39, 40, 46, ... bits.

Yes. Out of those all >= 32 are falling straight into ZONE_DM32,
the lower ones we do a first try in ZONE_DMA32 and then fall back to
ZONE_DMA. <= 29 mask OTOH are really rate in modern systems for
actual devices. So with a CMA region for what is currently ZONE_DMA
and one for the first 1G we'd probably cover most of what's actually
needed for x86_64. Of course on 32-bit architetures things become
a lot more complicated due to highmem.