On Mon, May 23, 2022 at 05:18:32PM -0700, Zach O'Keefe wrote: > (*) If we could verify that "never" THP mode was used _only_ for > debugging, then I'd actually opt to ignore "never" in MADV_COLLAPSE. Some real time users may have used thp=never to make sure there's no pgtable uncertainty in all cases (and pages will always be mlocked for the RT apps, so pre-faulted). Debattably it's the same as TRANSPARENT_HUGEPAGE=n but the user might want to use the same kernel with other purpose where thp could still be wanted? I've no solid clue. It's just that as long as we have the knob taking "never" as an option then people may be using it, I'm afraid. "no" is indeed stronger than "yes" in many cases, at least for thp it's always like that: thp=never will guarantee no thp globally, while thp=always will only provide thp when it's still possible. The same to MADV_[NO]HUGEPAGE but just for vmas. From that POV I think your current plan looks reasonable on respecting "no"s more than "yes"s for both layers. Thanks, -- Peter Xu