> > I feel like if you polled 100 system administrators (assuming they knew
We would all prefer a less messy world of THP tunables. I certainly
find plenty to dislike there too; and wish that a less assertive name
than "never" had been chosen originally for the default off position.
But please don't break the accepted and documented behaviour of
MADV_COLLAPSE now.
Again see above, I absolutely disagree this is documented _clearly_. And
that's the underlying issue here.
about THP) as to how you globally disable THP, probably all 100 would say
you do it via:
# echo never > /sys/kernel/mm/transparent_hugepage/enabled
So shouldn't 'never break userspace' be based on practical reality rather
than a theorised interpretation of documents that sadly are not clear
enough?
If you want to exclude all possibility of THPs, then please use the
prctl(PR_SET_THP_DISABLE); or shmem_enabled=deny (I think it was me
who insisted that be respected by MADV_COLLAPSE back then).
While it's useful to have this, prctl() is where APIs go to die. It's a
hidden wasteland that nobody knows about, it may as well not exist.
We have a whole sysctl directory for configuring this stuff. It's sort of
crazy to have that then to have a special prctl() hidden away also...
Add a "deny" option to /sys/kernel/mm/transparent_hugepage/enabled
if you like. (But in these days of filesystem large folios, adding
new protections against them seems a few years late.)
Based on a reasonable interpretation of 'never' I would say we retain this
series as-is, and 'deny' could be what 'never' was intended to be before.