The transparent huge page shrinker
The transparent huge page shrinker
Posted Sep 10, 2022 8:00 UTC (Sat) by WolfWings (subscriber, #56790)In reply to: The transparent huge page shrinker by linoliumz
Parent article: The transparent huge page shrinker
Serious question, is there a reason your code doesn't check if it's running on Linux at compile time and if so just utilize madvise() to explicitly request THP?
Because all distro's I've encountered for a few years now leave it set to madvise not disabling it entirely at least. And at this point the madvise() with MADV_HUGEPAGE is by orders of magnitude the most reliable and least troublesome way to utilize huge pages on Linux since everything else requires mucking about with lots of individual knobs by comparison.
