On 30.05.25 10:04, Ryan Roberts wrote:
On 29/05/2025 09:23, Baolin Wang wrote:
As we discussed in the previous thread [1], the MADV_COLLAPSE will ignore
the system-wide anon/shmem THP sysfs settings, which means that even though
we have disabled the anon/shmem THP configuration, MADV_COLLAPSE will still
attempt to collapse into a anon/shmem THP. This violates the rule we have
agreed upon: never means never. This patch set will address this issue.
This is a drive-by comment from me without having the previous context, but...
Surely MADV_COLLAPSE *should* ignore the THP sysfs settings? It's a deliberate
user-initiated, synchonous request to use huge pages for a range of memory.
There is nothing *transparent* about it, it just happens to be implemented using
the same logic that THP uses.
I always thought this was a deliberate design decision.
If the admin said "never", then why should a user be able to overwrite that?
The design decision I recall is that if VM_NOHUGEPAGE is set, we'll
ignore that. Because that was set by the app itself (MADV_NOHUEPAGE).
--
Cheers,
David / dhildenb