CC Barry.
On 2024/6/28 18:49, Bang Li wrote:
After the commit 7fb1b252afb5 ("mm: shmem: add mTHP support for
anonymous shmem"), we can configure different policies through
the multi-size THP sysfs interface for anonymous shmem. But
currently "THPeligible" indicates only whether the mapping is
eligible for allocating THP-pages as well as the THP is PMD
mappable or not for anonymous shmem, we need to support semantics
for mTHP with anonymous shmem similar to those for mTHP with
anonymous memory.
I did not see a consensus that "THP*" related statistics should contain
mTHP in previous discussion [1].
In addition, if we all agree that "THPeligible" should include mTHP
statistics, you should update the corresponding documentation to keep
consistency.
[1]
https://lore.kernel.org/linux-mm/202406262300.iAURISyJ-lkp@xxxxxxxxx/T/#md7a77056110cebcc2a9b3cd7e4a8d682667f6ba5