On 01.07.24 08:47, Baolin Wang wrote:
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
Fortunately, documentation (Documentation/filesystems/proc.rst) says:
"THPeligible" indicates whether the mapping is eligible for allocating
naturally aligned THP pages of any currently enabled size. 1 if true, 0
otherwise."
So that documentation is already pretty clear (we just have to make sure
the other ones are properly documented, for example as raised in reply
to [1]).
--
Cheers,
David / dhildenb