All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Freire <rfreire@redhat.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: linux-mm@kvack.org
Subject: [PATCH RESEND] Documentation: Describe the shared memory usage/accounting
Date: Sat, 5 Dec 2015 06:09:05 -0500 (EST)	[thread overview]
Message-ID: <1518369124.22714085.1449313745139.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1281769343.11551980.1447959500824.JavaMail.zimbra@redhat.com>


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>

WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Freire <rfreire@redhat.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: linux-mm@kvack.org
Subject: [PATCH RESEND] Documentation: Describe the shared memory usage/accounting
Date: Sat, 5 Dec 2015 06:09:05 -0500 (EST)	[thread overview]
Message-ID: <1518369124.22714085.1449313745139.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1281769343.11551980.1447959500824.JavaMail.zimbra@redhat.com>


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 

  reply	other threads:[~2015-12-05 11:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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-11-19 18:58   ` Rodrigo Freire
2015-12-05 11:09   ` Rodrigo Freire [this message]
2015-12-05 11:09     ` [PATCH RESEND] " Rodrigo Freire
2015-12-21 15:19   ` [PATCH] " Vlastimil Babka
2015-12-21 15:19     ` Vlastimil Babka
2015-12-21 18:07     ` [PATCH V2] " Rodrigo Freire
2015-12-21 18:07       ` Rodrigo Freire
2015-12-22 15:52       ` Vlastimil Babka
2015-12-22 15:52         ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518369124.22714085.1449313745139.JavaMail.zimbra@redhat.com \
    --to=rfreire@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.