linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] docs: update THP admin guide about non-tmpfs filesystem support
@ 2025-04-04 14:06 Pankaj Raghav (Samsung)
  2025-04-04 15:32 ` Luis Chamberlain
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Pankaj Raghav (Samsung) @ 2025-04-04 14:06 UTC (permalink / raw)
  To: Andrew Morton, Jonathan Corbet
  Cc: linux-kernel, willy, linux-mm, Bagas Sanjaya, David Hildenbrand,
	da.gomez, mcgrof, gost.dev, linux-doc, kernel, Pankaj Raghav

From: Pankaj Raghav <p.raghav@samsung.com>

THP support for non-tmpfs filesystem has been around for some time now.
Update the admin guide to reflect it.

While we are at it, move FilePmdMapped to previous paragraph for clarity,
and clarify ShmemPmdMapped & ShmemHugePage.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Acked-by: David Hildenbrand <david@redhat.com>
---

Changes since v2:
- Address comment from Bagas Sanjaya
- Squash commits and Ack from David

 Documentation/admin-guide/mm/transhuge.rst | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
index dff8d5985f0f..f8aae64e38d0 100644
--- a/Documentation/admin-guide/mm/transhuge.rst
+++ b/Documentation/admin-guide/mm/transhuge.rst
@@ -12,8 +12,8 @@ using huge pages for the backing of virtual memory with huge pages
 that supports the automatic promotion and demotion of page sizes and
 without the shortcomings of hugetlbfs.
 
-Currently THP only works for anonymous memory mappings and tmpfs/shmem.
-But in the future it can expand to other filesystems.
+Currently, THP only works for anonymous memory mappings, tmpfs/shmem and
+filesystems that support large folios.
 
 .. note::
    in the examples below we presume that the basic page size is 4K and
@@ -463,11 +463,19 @@ fields for each mapping. (Note that AnonHugePages only applies to traditional
 PMD-sized THP for historical reasons and should have been called
 AnonHugePmdMapped).
 
-The number of file transparent huge pages mapped to userspace is available
-by reading ShmemPmdMapped and ShmemHugePages fields in ``/proc/meminfo``.
-To identify what applications are mapping file transparent huge pages, it
-is necessary to read ``/proc/PID/smaps`` and count the FilePmdMapped fields
-for each mapping.
+The number of PMD-sized transparent huge pages currently used by
+filesystem data (page cache) is available by reading the FileHugePages field
+in ``/proc/meminfo``. The number of these huge pages that are mapped to userspace
+is available by reading FilePmdMapped field in ``proc/meminfo``. To identify
+what applications are mapping these huge pages, it is necessary to read
+``/proc/PID/smaps`` and count the FilePmdMapped fields for each mapping.
+
+In similar fashion, the number of PMD-sized transparent huge pages currently
+used by tmpfs/shmem is available by reading the ShmemHugePages field
+in ``/proc/meminfo``. The number of these huge pages that are mapped to userspace
+is available by reading ShmemPmdMapped field in ``proc/meminfo``. To identify
+what applications are mapping these huge pages, it is necessary to read
+``/proc/PID/smaps`` and count the ShmemPmdMapped fields for each mapping.
 
 Note that reading the smaps file is expensive and reading it
 frequently will incur overhead.

base-commit: f0a16f5363325cc8d9382471cdc7b654c53254c9
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-04-10  9:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 14:06 [PATCH v3] docs: update THP admin guide about non-tmpfs filesystem support Pankaj Raghav (Samsung)
2025-04-04 15:32 ` Luis Chamberlain
2025-04-04 16:18   ` David Hildenbrand
2025-04-04 17:58     ` Luis Chamberlain
2025-04-04 19:07       ` David Hildenbrand
2025-04-04 19:44         ` Daniel Gomez
2025-04-04 20:01           ` David Hildenbrand
2025-04-04 16:31   ` Pankaj Raghav (Samsung)
2025-04-04 18:02     ` Luis Chamberlain
2025-04-10  9:31       ` Daniel Gomez
2025-04-04 19:16 ` David Hildenbrand
2025-04-08  9:44   ` Pankaj Raghav (Samsung)
2025-04-04 23:55 ` Bagas Sanjaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).