On 05.08.25 16:24, Jason Gunthorpe wrote:
On Tue, Aug 05, 2025 at 04:22:32PM +0200, David Hildenbrand wrote:
On 05.08.25 16:20, Jason Gunthorpe wrote:
On Tue, Aug 05, 2025 at 04:10:45PM +0200, David Hildenbrand wrote:
There are some weird scenarios where you hotplug memory after boot memory,
and suddenly you can runtime-allocate a gigantic folio that spans both
ranges etc.
I was thinking we'd forbid this directly, but yes it is a another new
check.
So while related, the corner cases are all a bit nasty, and just forbidding
folios to span a memory section on these problematic configs (sparse
!vmemmap) sounds interesting.
Indeed, this just sounds like forcing MAX_ORDER to be no larger than
the section size for this old mode?
MAX_ORDER is always limited to the section size already.
MAX_ORDER is only about buddy allocations. What hugetlb and dax do is
independent of MAX_ORDER.
Oh I thought it limited folios too.
Still same idea is to have a MAX_FOLIO_ORDER for that case.
Yes. Usually unlimited, except we are in this weird config state.
--
Cheers,
David / dhildenb