Splitting must be entirely logarithmic
Splitting must be entirely logarithmic
Posted May 12, 2026 21:52 UTC (Tue) by willy (subscriber, #9762)Parent article: Scaling transparent huge pages to 1GB
I must have missed or misunderstood this question. Usama has asked it of me before, and I was very clear on my answer, which has not changed. No, this is not acceptable.
Assuming 4k/2M/1G, splitting a 1G down to 511 PMDs, then splitting the last PMD logarithmically means we need to allocate 521 folios. That's too much strain to place on slab. Sure, it's better than 262,144, but it's still too high. Splitting the entire 1GB logarithmically means we need 19 new folios, a far more reasonable number.
The problem is that the MM does not yet handle folios larger than PMD size. But Usama is not the only one who wants folios larger than PMD size, so he should be able to find reviewers (if you review Usama's code, you don't have to write it yourself! Nor do you have to find reviewers for it!)
Trying to dodge fixing this shortcoming in the MM is poor form. This is functionally we need, and somebody has to do it. If Usama wants to land 1GB support, he needs to do it.. Or procrastinate until somebody else does it. But I don't think it's that hard, just fiddly.
