Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933472AbbHKAo5 (ORCPT ); Mon, 10 Aug 2015 20:44:57 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:35661 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932864AbbHKAo4 (ORCPT ); Mon, 10 Aug 2015 20:44:56 -0400 Date: Mon, 10 Aug 2015 17:44:54 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Naoya Horiguchi cc: Andrew Morton , =?UTF-8?Q?J=C3=B6rn_Engel?= , Mike Kravetz , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Naoya Horiguchi Subject: Re: [PATCH v3 3/3] Documentation/filesystems/proc.txt: document hugetlb RSS In-Reply-To: <1439167624-17772-4-git-send-email-n-horiguchi@ah.jp.nec.com> Message-ID: References: <20150807155537.d483456f753355059f9ce10a@linux-foundation.org> <1439167624-17772-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1439167624-17772-4-git-send-email-n-horiguchi@ah.jp.nec.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3128 Lines: 57 On Mon, 10 Aug 2015, Naoya Horiguchi wrote: > 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 My objection to adding hugetlb memory to the RSS field of /proc/pid/smaps still stands and can be addressed in the thread of the first patch. Since this includes wording that describes that change, then the objection would also cover that. With regard to adding VmHugetlbRSS, I think the change is fine, and I appreciate that you call it VmHugetlbRSS and not VmHugeRSS since that would be confused with thp. My only concern regarding VmHugetlbRSS would be extendability and whether we will eventually, or even today, want to differentiate between various hugetlb page sizes. For example, if 1GB hugetlb pages on x86 are a precious resource, then how do I determine which process has mapped it rather than 512 2MB hugetlb pages? -- 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/