* [PATCH] docs: update THP admin guide about non-tmpfs filesystem support
@ 2025-04-03 10:38 Pankaj Raghav (Samsung)
2025-04-03 10:50 ` Bagas Sanjaya
2025-04-03 13:49 ` David Hildenbrand
0 siblings, 2 replies; 4+ messages in thread
From: Pankaj Raghav (Samsung) @ 2025-04-03 10:38 UTC (permalink / raw)
To: Andrew Morton, Jonathan Corbet
Cc: linux-kernel, willy, linux-mm, 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.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
Documentation/admin-guide/mm/transhuge.rst | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
index dff8d5985f0f..01b7ce90d693 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,6 +463,10 @@ 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 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 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
base-commit: f0a16f5363325cc8d9382471cdc7b654c53254c9
--
2.44.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] docs: update THP admin guide about non-tmpfs filesystem support
2025-04-03 10:38 [PATCH] docs: update THP admin guide about non-tmpfs filesystem support Pankaj Raghav (Samsung)
@ 2025-04-03 10:50 ` Bagas Sanjaya
2025-04-03 13:49 ` David Hildenbrand
1 sibling, 0 replies; 4+ messages in thread
From: Bagas Sanjaya @ 2025-04-03 10:50 UTC (permalink / raw)
To: Pankaj Raghav (Samsung), Andrew Morton, Jonathan Corbet
Cc: linux-kernel, willy, linux-mm, David Hildenbrand, da.gomez,
mcgrof, gost.dev, linux-doc, Pankaj Raghav
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
On Thu, Apr 03, 2025 at 12:38:05PM +0200, Pankaj Raghav (Samsung) wrote:
> diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
> index dff8d5985f0f..01b7ce90d693 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,6 +463,10 @@ 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 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 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
>
> base-commit: f0a16f5363325cc8d9382471cdc7b654c53254c9
The wording looks good, thanks!
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] docs: update THP admin guide about non-tmpfs filesystem support
2025-04-03 10:38 [PATCH] docs: update THP admin guide about non-tmpfs filesystem support Pankaj Raghav (Samsung)
2025-04-03 10:50 ` Bagas Sanjaya
@ 2025-04-03 13:49 ` David Hildenbrand
2025-04-03 18:21 ` Pankaj Raghav (Samsung)
1 sibling, 1 reply; 4+ messages in thread
From: David Hildenbrand @ 2025-04-03 13:49 UTC (permalink / raw)
To: Pankaj Raghav (Samsung), Andrew Morton, Jonathan Corbet
Cc: linux-kernel, willy, linux-mm, da.gomez, mcgrof, gost.dev,
linux-doc, Pankaj Raghav
On 03.04.25 12:38, Pankaj Raghav (Samsung) wrote:
> 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.
>
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> ---
> Documentation/admin-guide/mm/transhuge.rst | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
> index dff8d5985f0f..01b7ce90d693 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,6 +463,10 @@ 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 PMD-sized transparent huge pages currently used by
> +filesystem data (page cache) is available by reading the FileHugePages field
> +in ``/proc/meminfo``.
> +
These changed look good. Do we also want to talk about FilePmdMapped?
(PMD-sized THPs in the page cache that are mapped in to user space using
a PMD ?)
Do we have to distinguish it from below? (shmem also uses the page cache)
> 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
Previously here, but: this reads rather odd. "file transparent huge
pages". "PMD-sized THPs specific to shmem are tracked separately ..." ?
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] docs: update THP admin guide about non-tmpfs filesystem support
2025-04-03 13:49 ` David Hildenbrand
@ 2025-04-03 18:21 ` Pankaj Raghav (Samsung)
0 siblings, 0 replies; 4+ messages in thread
From: Pankaj Raghav (Samsung) @ 2025-04-03 18:21 UTC (permalink / raw)
To: David Hildenbrand
Cc: Andrew Morton, Jonathan Corbet, linux-kernel, willy, linux-mm,
da.gomez, mcgrof, gost.dev, linux-doc, Pankaj Raghav
> > in the examples below we presume that the basic page size is 4K and
> > @@ -463,6 +463,10 @@ 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 PMD-sized transparent huge pages currently used by
> > +filesystem data (page cache) is available by reading the FileHugePages field
> > +in ``/proc/meminfo``.
> > +
>
> These changed look good. Do we also want to talk about FilePmdMapped?
> (PMD-sized THPs in the page cache that are mapped in to user space using a
> PMD ?)
I am a bit new to this subsystem, and it took some time to wrap around all
the different terminology used :)
But sure, I will add a new commit to talk about FilePmdMapped. I can
give it a shot with what I understand about FilePmdMapped, but please feel
free to add your input.
>
> Do we have to distinguish it from below? (shmem also uses the page cache)
>
> > 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
>
> Previously here, but: this reads rather odd. "file transparent huge pages".
> "PMD-sized THPs specific to shmem are tracked separately ..." ?
>
I totally agree. Reading "file transparent huge pages" confused me even
more. I will fold these changes as well.
Thanks, David.
--
Pankaj
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-03 18:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-03 10:38 [PATCH] docs: update THP admin guide about non-tmpfs filesystem support Pankaj Raghav (Samsung)
2025-04-03 10:50 ` Bagas Sanjaya
2025-04-03 13:49 ` David Hildenbrand
2025-04-03 18:21 ` Pankaj Raghav (Samsung)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox