Larger MAX_PAGE_ORDER means larger section size and larger mem_block size, so the granularity of memory hotplug also increases. In this case: 1. ARM64 4KB: mem_block size increases from 4MB to 32MB, 2. ARM64 16KB: mem_block size increases from 32MB to 128MB, 3. ARM64 64KB: mem_block size keeps the same, 512MB. DavidH was concerned about large mem_block size before. He might have some opinion on this. > >> >> Is there any plan (not in this patchset) to support boot-time MAX_PAGE_ORDER >> to keep section size the same? > > Yes absolutely. I should have documented MAX_PAGE_ORDER in the commit log along > with the comments for MMAP_RND_BITS and SECTION_SIZE_BITS - that was an > oversight and I'll fix it in the next version. I plan to look at making all 3 > values boot-time configurable in future (although I have no idea at this point > how involved that will be). In [1], I tried to make MAX_PAGE_ORDER a boot time variable, but for a different purpose, allocating 1GB THP. I needed some additional changes in my patchset, since I assumed MAX_PAGE_ORDER can go beyond section size, which makes things a little bit complicated. For your case, I assume you are not planning to make MAX_PAGE_ORDER bigger than section size, then I should be able to revive my patchset with fewer changes. In terms of SECTION_SIZE_BITS, why do you want to make it a boot time variable? Since it decides the minimum memory hotplug size, I assume we should keep it unchanged or as small as possible to make virtual machine memory usage efficient. [1] https://lore.kernel.org/linux-mm/20220811231643.1012912-1-zi.yan@xxxxxxxx/ Best Regards, Yan, Zi --=_MailMate_8B77AFF2-B39C-4BA1-B5FB-D7051CA6DD16_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAmcPy98PHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqKrW8QAJ2uBRtl+yXCwoBAaqxvhEeK7DB+wQzwCrQf rPFdb4WCXunE2bn5FNAOPqzNGV4BJhM/zkUgbcdeE5hQZ/16aVZbzbVI8lMhG+SL RYdRKcT7+MzEH0JqbalpW4BqTr4uqQNcTiiSCyiS+gtNqP0+g0dVWrIdd6tcbdK4 E7Lfu7hnQFD754/Ej6nvT4nMHfOViNauFVyh7wLEtw7XJu9cSEbvQWv0awM6kLQD GoSUQBOInFu8otVpQ5T7rlltLVP35tWJVEV1iSVwnNpumVnwYGC6ajq/7ulanqyZ nd0FZ/Qo+4m0aw5QWLFqKFxXP7hqH9F35rI5cbXdl+8z/2egK7PK6Hqt2SFDdJbV loU4T6HAiMmK54hg/ssT4h96YIumUR9dzwixFJPUmlTlewZtTEvx7Z9TpCs2Q5Oi EylqTG3H1W9yJEFSoW7V2ONkmqGiSamJcBZ1qDIUn9nOT4FMIRaYRfvkXk1mPjuI okyAcs4erYl41OBCOEDz+6ZjbDECYd6piWUzv/f2v43LjBuZJreI324H5w3kLtlA nCAxMjbdmmLeKh/uL7d7nLX1H4lcEcWJObiQEbXl0OOY5ePp9wn61LoK5kMA8k3f urOorSjfIqbe0vkmWX389dIiIqxTvXxdT60pUwQLTF5AVdi/xCBn1P3RSLnlpHtq zyJz9smB =N6Et -----END PGP SIGNATURE----- --=_MailMate_8B77AFF2-B39C-4BA1-B5FB-D7051CA6DD16_=--