Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752602AbbHJAtL (ORCPT ); Sun, 9 Aug 2015 20:49:11 -0400 Received: from TYO201.gate.nec.co.jp ([210.143.35.51]:62940 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250AbbHJAso (ORCPT ); Sun, 9 Aug 2015 20:48:44 -0400 From: Naoya Horiguchi To: Andrew Morton , David Rientjes , =?utf-8?B?SsO2cm4gRW5nZWw=?= CC: Mike Kravetz , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Naoya Horiguchi , Naoya Horiguchi Subject: [PATCH v3 3/3] Documentation/filesystems/proc.txt: document hugetlb RSS Thread-Topic: [PATCH v3 3/3] Documentation/filesystems/proc.txt: document hugetlb RSS Thread-Index: AQHQ0wYWL0KaemjBQkqTITqCBcBaaQ== Date: Mon, 10 Aug 2015 00:47:09 +0000 Message-ID: <1439167624-17772-4-git-send-email-n-horiguchi@ah.jp.nec.com> References: <20150807155537.d483456f753355059f9ce10a@linux-foundation.org> <1439167624-17772-1-git-send-email-n-horiguchi@ah.jp.nec.com> In-Reply-To: <1439167624-17772-1-git-send-email-n-horiguchi@ah.jp.nec.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.31] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7A0nIOR031939 Content-Length: 2438 Lines: 45 /proc/PID/{status,smaps} is aware of hugetlb RSS now, so let's document it. Signed-off-by: Naoya Horiguchi --- Documentation/filesystems/proc.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git v4.2-rc4.orig/Documentation/filesystems/proc.txt v4.2-rc4/Documentation/filesystems/proc.txt index 6f7fafde0884..cb8565e150ed 100644 --- v4.2-rc4.orig/Documentation/filesystems/proc.txt +++ v4.2-rc4/Documentation/filesystems/proc.txt @@ -168,6 +168,7 @@ For example, to get the status information of a process, all you have to do is VmLck: 0 kB VmHWM: 476 kB VmRSS: 476 kB + VmHugetlbRSS: 0 kB VmData: 156 kB VmStk: 88 kB VmExe: 68 kB @@ -230,6 +231,7 @@ Table 1-2: Contents of the status files (as of 4.1) VmLck locked memory size VmHWM peak resident set size ("high water mark") VmRSS size of memory portions + VmHugetlbRSS size of hugetlb memory portions VmData size of data, stack, and text segments VmStk size of data, stack, and text segments VmExe size of text segment @@ -440,8 +442,12 @@ indicates the amount of memory currently marked as referenced or accessed. "Anonymous" shows the amount of memory that does not belong to any file. Even a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE and a page is modified, the file page is replaced by a private anonymous copy. -"Swap" shows how much would-be-anonymous memory is also used, but out on -swap. +"Swap" shows how much would-be-anonymous memory is also used, but out on swap. +Since 4.3, "RSS" contains the amount of mappings for hugetlb pages. Although +RSS of hugetlb mappings is maintained separately from normal mappings +(displayed in "VmHugetlbRSS" field of /proc/PID/status,) /proc/PID/smaps shows +both mappings in "RSS" field. Userspace applications clearly distinguish the +type of mapping with 'ht' flag in "VmFlags" field. "VmFlags" field deserves a separate description. This member represents the kernel flags associated with the particular virtual memory area in two letter encoded -- 2.4.3 ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?