From: Pankaj Raghav <p.raghav@samsung.com>
Move FilePmdMapped to previous paragraph for clarity, and clarify
ShmemPmdMapped & ShmemHugePage.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
Documentation/admin-guide/mm/transhuge.rst | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
index 01b7ce90d693..b0b9d578732b 100644
--- a/Documentation/admin-guide/mm/transhuge.rst
+++ b/Documentation/admin-guide/mm/transhuge.rst
@@ -465,13 +465,17 @@ AnonHugePmdMapped).
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``.
+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.
-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
+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.
--
2.47.2
On 04.04.25 12:01, Pankaj Raghav (Samsung) wrote: > From: Pankaj Raghav <p.raghav@samsung.com> > > Move FilePmdMapped to previous paragraph for clarity, and clarify > ShmemPmdMapped & ShmemHugePage. > > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > --- > Documentation/admin-guide/mm/transhuge.rst | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst > index 01b7ce90d693..b0b9d578732b 100644 > --- a/Documentation/admin-guide/mm/transhuge.rst > +++ b/Documentation/admin-guide/mm/transhuge.rst > @@ -465,13 +465,17 @@ AnonHugePmdMapped). > > 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``. > +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. > Having that change here looks weird. I suggest to just squash both patches, they are intertwined. > -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 > +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. Apart from that (and taking Bagas comment in account), LGTM. Feel free to add Acked-by: David Hildenbrand <david@redhat.com> -- Cheers, David / dhildenb
On Fri, Apr 04, 2025 at 12:01:59PM +0200, Pankaj Raghav (Samsung) wrote: > -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 "In similar fashion, the number ..." > +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. > Thanks. -- An old man doll... just what I always wanted! - Clara
© 2016 - 2026 Red Hat, Inc.