Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbbHTXWY (ORCPT ); Thu, 20 Aug 2015 19:22:24 -0400 Received: from TYO201.gate.nec.co.jp ([210.143.35.51]:37710 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752915AbbHTXWW (ORCPT ); Thu, 20 Aug 2015 19:22:22 -0400 From: Naoya Horiguchi To: Michal Hocko CC: Andrew Morton , David Rientjes , =?utf-8?B?SsO2cm4gRW5nZWw=?= , Mike Kravetz , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Naoya Horiguchi Subject: Re: [PATCH v5 1/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/smaps Thread-Topic: [PATCH v5 1/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/smaps Thread-Index: AQHQ2yHn+YywyXZF3USjpses11xHFp4UHqOAgADRvoA= Date: Thu, 20 Aug 2015 23:20:12 +0000 Message-ID: <20150820232011.GA10807@hori1.linux.bs1.fc.nec.co.jp> References: <20150812000336.GB32192@hori1.linux.bs1.fc.nec.co.jp> <1440059182-19798-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1440059182-19798-2-git-send-email-n-horiguchi@ah.jp.nec.com> <20150820104929.GA4632@dhcp22.suse.cz> In-Reply-To: <20150820104929.GA4632@dhcp22.suse.cz> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.16] Content-Type: text/plain; charset="utf-8" Content-ID: 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 t7KNMU32030656 Content-Length: 2792 Lines: 65 On Thu, Aug 20, 2015 at 12:49:29PM +0200, Michal Hocko wrote: > On Thu 20-08-15 08:26:26, Naoya Horiguchi wrote: > > Currently /proc/PID/smaps provides no usage info for vma(VM_HUGETLB), which > > is inconvenient when we want to know per-task or per-vma base hugetlb usage. > > To solve this, this patch adds a new line for hugetlb usage like below: > > > > Size: 20480 kB > > Rss: 0 kB > > Pss: 0 kB > > Shared_Clean: 0 kB > > Shared_Dirty: 0 kB > > Private_Clean: 0 kB > > Private_Dirty: 0 kB > > Referenced: 0 kB > > Anonymous: 0 kB > > AnonHugePages: 0 kB > > HugetlbPages: 18432 kB > > Swap: 0 kB > > KernelPageSize: 2048 kB > > MMUPageSize: 2048 kB > > Locked: 0 kB > > VmFlags: rd wr mr mw me de ht > > I have only now got to this thread. This is indeed very helpful. I would > just suggest to update Documentation/filesystems/proc.txt to be explicit > that Rss: doesn't count hugetlb pages for historical reasons. I agree, I want the following diff to be folded to this patch. > > > Signed-off-by: Naoya Horiguchi > > Acked-by: Joern Engel > > Acked-by: David Rientjes > > Acked-by: Michal Hocko Thank you. Naoya Horiguchi --- From: Naoya Horiguchi Date: Fri, 21 Aug 2015 08:13:31 +0900 Subject: [PATCH] Documentation/filesystems/proc.txt: give additional comment about hugetlb usage --- Documentation/filesystems/proc.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index f561fc46e41b..b775b6faaeda 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -446,7 +446,8 @@ indicates the amount of memory currently marked as referenced or accessed. 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. "AnonHugePages" shows the ammount of memory backed by transparent hugepage. -"HugetlbPages" shows the ammount of memory backed by hugetlbfs page. +"HugetlbPages" shows the ammount of memory backed by hugetlbfs page (which is +not counted in "Rss" or "Pss" field for historical reasons.) "Swap" shows how much would-be-anonymous memory is also used, but out on swap. "VmFlags" field deserves a separate description. This member represents the kernel -- 2.4.3 ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?