On Fri, 26 Jul 2024 at 14:33, David Laight <David.Laight@xxxxxxxxxx> wrote: > > I suspect just reordering to: > extra_pages = min3(extra_pages, max_pages - max_pfn, > EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM))); > will have a similar effect. That's disgusting. No, we're not adding random "the ordering of min3() matters subtly for expansion size" crap. We're simplifying the sub-expressions, and fixing the problem that way. Linus