* [PATCH] Documentation: Describe the shared memory usage/accounting [not found] <204373273.11549849.1447959061954.JavaMail.zimbra@redhat.com> @ 2015-11-19 18:58 ` Rodrigo Freire 2015-12-05 11:09 ` [PATCH RESEND] " Rodrigo Freire 2015-12-21 15:19 ` [PATCH] " Vlastimil Babka 0 siblings, 2 replies; 5+ messages in thread From: Rodrigo Freire @ 2015-11-19 18:58 UTC (permalink / raw) To: linux-kernel; +Cc: linux-mm The Shared Memory accounting support is present in Kernel since commit 4b02108ac1b3 ("mm: oom analysis: add shmem vmstat") and in userland free(1) since 2014. This patch updates the Documentation to reflect this change. Signed-off-by: Rodrigo Freire <rfreire@redhat.com> --- --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -842,6 +842,7 @@ Writeback: 0 kB AnonPages: 861800 kB Mapped: 280372 kB +Shmem: 644 kB Slab: 284364 kB SReclaimable: 159856 kB SUnreclaim: 124508 kB @@ -898,6 +899,7 @@ AnonPages: Non-file backed pages mapped into userspace page tables AnonHugePages: Non-file backed huge pages mapped into userspace page tables Mapped: files which have been mmaped, such as libraries + Shmem: Total memory used by shared memory (shmem) and tmpfs Slab: in-kernel data structures cache SReclaimable: Part of Slab, that might be reclaimed, such as caches SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt @@ -17,10 +17,10 @@ cannot swap and you do not have the possibility to resize them. Since tmpfs lives completely in the page cache and on swap, all tmpfs -pages currently in memory will show up as cached. It will not show up -as shared or something like that. Further on you can check the actual -RAM+swap use of a tmpfs instance with df(1) and du(1). - +pages will be shown in /proc/meminfo as "Shmem" and "Shared" in +free(1). Notice that shared memory pages (see ipcs(1)) will be also +counted as shared memory. The most reliable way to get the count is +using df(1) and du(1). tmpfs has the following uses: --- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RESEND] Documentation: Describe the shared memory usage/accounting 2015-11-19 18:58 ` [PATCH] Documentation: Describe the shared memory usage/accounting Rodrigo Freire @ 2015-12-05 11:09 ` Rodrigo Freire 2015-12-21 15:19 ` [PATCH] " Vlastimil Babka 1 sibling, 0 replies; 5+ messages in thread From: Rodrigo Freire @ 2015-12-05 11:09 UTC (permalink / raw) To: linux-kernel; +Cc: linux-mm The Shared Memory accounting support is present in Kernel since commit 4b02108ac1b3 ("mm: oom analysis: add shmem vmstat") and in userland free(1) since 2014. This patch updates the Documentation to reflect this change. Signed-off-by: Rodrigo Freire <rfreire@redhat.com> --- --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -842,6 +842,7 @@ Writeback: 0 kB AnonPages: 861800 kB Mapped: 280372 kB +Shmem: 644 kB Slab: 284364 kB SReclaimable: 159856 kB SUnreclaim: 124508 kB @@ -898,6 +899,7 @@ AnonPages: Non-file backed pages mapped into userspace page tables AnonHugePages: Non-file backed huge pages mapped into userspace page tables Mapped: files which have been mmaped, such as libraries + Shmem: Total memory used by shared memory (shmem) and tmpfs Slab: in-kernel data structures cache SReclaimable: Part of Slab, that might be reclaimed, such as caches SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt @@ -17,10 +17,10 @@ cannot swap and you do not have the possibility to resize them. Since tmpfs lives completely in the page cache and on swap, all tmpfs -pages currently in memory will show up as cached. It will not show up -as shared or something like that. Further on you can check the actual -RAM+swap use of a tmpfs instance with df(1) and du(1). - +pages will be shown in /proc/meminfo as "Shmem" and "Shared" in +free(1). Notice that shared memory pages (see ipcs(1)) will be also +counted as shared memory. The most reliable way to get the count is +using df(1) and du(1). tmpfs has the following uses: --- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation: Describe the shared memory usage/accounting 2015-11-19 18:58 ` [PATCH] Documentation: Describe the shared memory usage/accounting Rodrigo Freire 2015-12-05 11:09 ` [PATCH RESEND] " Rodrigo Freire @ 2015-12-21 15:19 ` Vlastimil Babka 2015-12-21 18:07 ` [PATCH V2] " Rodrigo Freire 1 sibling, 1 reply; 5+ messages in thread From: Vlastimil Babka @ 2015-12-21 15:19 UTC (permalink / raw) To: Rodrigo Freire, linux-kernel; +Cc: linux-mm On 11/19/2015 07:58 PM, Rodrigo Freire wrote: > > The Shared Memory accounting support is present in Kernel since > commit 4b02108ac1b3 ("mm: oom analysis: add shmem vmstat") and in userland > free(1) since 2014. This patch updates the Documentation to reflect > this change. > > Signed-off-by: Rodrigo Freire <rfreire@redhat.com> You should send to Andrew Morton and maybe CC Hugh Dickins at the very least. Sending just to mailing list doesn't guarantee maintainers will pick it up due to the high volume there. Also note that your RESEND has broken whitespace. > --- > --- a/Documentation/filesystems/proc.txt > +++ b/Documentation/filesystems/proc.txt > @@ -842,6 +842,7 @@ > Writeback: 0 kB > AnonPages: 861800 kB > Mapped: 280372 kB > +Shmem: 644 kB > Slab: 284364 kB > SReclaimable: 159856 kB > SUnreclaim: 124508 kB > @@ -898,6 +899,7 @@ > AnonPages: Non-file backed pages mapped into userspace page tables > AnonHugePages: Non-file backed huge pages mapped into userspace page tables > Mapped: files which have been mmaped, such as libraries > + Shmem: Total memory used by shared memory (shmem) and tmpfs > Slab: in-kernel data structures cache > SReclaimable: Part of Slab, that might be reclaimed, such as caches > SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure > --- a/Documentation/filesystems/tmpfs.txt > +++ b/Documentation/filesystems/tmpfs.txt > @@ -17,10 +17,10 @@ > cannot swap and you do not have the possibility to resize them. > > Since tmpfs lives completely in the page cache and on swap, all tmpfs > -pages currently in memory will show up as cached. It will not show up > -as shared or something like that. Further on you can check the actual > -RAM+swap use of a tmpfs instance with df(1) and du(1). > - > +pages will be shown in /proc/meminfo as "Shmem" and "Shared" in It would be IMHO clearer if it said: ... will be shown as "Shmem" in /proc/meminfo and "Shared" in ... > +free(1). Notice that shared memory pages (see ipcs(1)) will be also > +counted as shared memory. Too much of "shared memory" here. Maybe something like: "However, these counters also include shared memory (shmem)." > The most reliable way to get the count is > +using df(1) and du(1). > > tmpfs has the following uses: > > --- > 1.7.1 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V2] Documentation: Describe the shared memory usage/accounting 2015-12-21 15:19 ` [PATCH] " Vlastimil Babka @ 2015-12-21 18:07 ` Rodrigo Freire 2015-12-22 15:52 ` Vlastimil Babka 0 siblings, 1 reply; 5+ messages in thread From: Rodrigo Freire @ 2015-12-21 18:07 UTC (permalink / raw) To: Vlastimil Babka; +Cc: linux-kernel, linux-mm, akpm, hughd The Shared Memory accounting support is present in Kernel since commit 4b02108ac1b3 ("mm: oom analysis: add shmem vmstat") and in userland free(1) since 2014. This patch updates the Documentation to reflect this change. Signed-off-by: Rodrigo Freire <rfreire@redhat.com> --- V2: Better wording as per Vlastimil Babka's suggestions --- Documentation/filesystems/proc.txt | 2 ++ Documentation/filesystems/tmpfs.txt | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 402ab99..8ca61a0 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -842,6 +842,7 @@ Dirty: 968 kB Writeback: 0 kB AnonPages: 861800 kB Mapped: 280372 kB +Shmem: 644 kB Slab: 284364 kB SReclaimable: 159856 kB SUnreclaim: 124508 kB @@ -898,6 +899,7 @@ MemAvailable: An estimate of how much memory is available for starting new AnonPages: Non-file backed pages mapped into userspace page tables AnonHugePages: Non-file backed huge pages mapped into userspace page tables Mapped: files which have been mmaped, such as libraries + Shmem: Total memory used by shared memory (shmem) and tmpfs Slab: in-kernel data structures cache SReclaimable: Part of Slab, that might be reclaimed, such as caches SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt index 98ef551..d1abf2d 100644 --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt @@ -17,10 +17,10 @@ RAM, where you have to create an ordinary filesystem on top. Ramdisks cannot swap and you do not have the possibility to resize them. Since tmpfs lives completely in the page cache and on swap, all tmpfs -pages currently in memory will show up as cached. It will not show up -as shared or something like that. Further on you can check the actual -RAM+swap use of a tmpfs instance with df(1) and du(1). - +pages will be shown as "Shmem" in /proc/meminfo and "Shared" in +free(1). Notice that these counters also include shared memory +(shmem, see ipcs(1)). The most reliable way to get the count is +using df(1) and du(1). tmpfs has the following uses: -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V2] Documentation: Describe the shared memory usage/accounting 2015-12-21 18:07 ` [PATCH V2] " Rodrigo Freire @ 2015-12-22 15:52 ` Vlastimil Babka 0 siblings, 0 replies; 5+ messages in thread From: Vlastimil Babka @ 2015-12-22 15:52 UTC (permalink / raw) To: Rodrigo Freire; +Cc: linux-kernel, linux-mm, akpm, hughd On 12/21/2015 07:07 PM, Rodrigo Freire wrote: > > The Shared Memory accounting support is present in Kernel since > commit 4b02108ac1b3 ("mm: oom analysis: add shmem vmstat") and in > userland free(1) since 2014. This patch updates the Documentation to > reflect this change. > > Signed-off-by: Rodrigo Freire <rfreire@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-22 15:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <204373273.11549849.1447959061954.JavaMail.zimbra@redhat.com>
2015-11-19 18:58 ` [PATCH] Documentation: Describe the shared memory usage/accounting Rodrigo Freire
2015-12-05 11:09 ` [PATCH RESEND] " Rodrigo Freire
2015-12-21 15:19 ` [PATCH] " Vlastimil Babka
2015-12-21 18:07 ` [PATCH V2] " Rodrigo Freire
2015-12-22 15:52 ` Vlastimil Babka
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).