On Wed, Jun 25, 2025 at 08:55:28AM +0100, Lorenzo Stoakes wrote:
I suppose the least awful way of addressing Baolin's concerns re: mTHP
while simultaneosly keeping existing semantics is:
1. Introduce deny to mean what never should have meant.
To fix Baolin's issue btw we'd have to add 'deny' to both 'global' settings
_and_ each page size setting.
Because otherwise we'd end up in a weird case where say:
global 'deny'
2 MiB 'never'
64 KiB 'inherit'
And err... get 2 MiB THP pages from MADV_COLLAPSE :)
Or:
global 'deny'
2 MiB 'never'
64 KiB 'always'
Or:
global 'never'
2 MiB 'never'
64 KiB 'always'
Or:
global 'never'
2 MiB 'madvise'
64 KiB 'always'
All doing the same. Not very clear is it?
We have sowed the seeds of something terrible here, truly.