Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754187AbbLELJI (ORCPT ); Sat, 5 Dec 2015 06:09:08 -0500 Received: from mx5-phx2.redhat.com ([209.132.183.37]:46627 "EHLO mx5-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753949AbbLELJG (ORCPT ); Sat, 5 Dec 2015 06:09:06 -0500 Date: Sat, 5 Dec 2015 06:09:05 -0500 (EST) From: Rodrigo Freire To: linux-kernel Cc: linux-mm@kvack.org Message-ID: <1518369124.22714085.1449313745139.JavaMail.zimbra@redhat.com> In-Reply-To: <1281769343.11551980.1447959500824.JavaMail.zimbra@redhat.com> Subject: [PATCH RESEND] Documentation: Describe the shared memory usage/accounting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.97.5.216] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF38 (Linux)/8.0.6_GA_5922) Thread-Topic: Documentation: Describe the shared memory usage/accounting Thread-Index: rqJP8BSXhkTmE7A+HUdIdJPefFKx1Q== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1961 Lines: 50 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 --- --- 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/