From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754600AbdKMT0l (ORCPT ); Mon, 13 Nov 2017 14:26:41 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:23306 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753745AbdKMT0j (ORCPT ); Mon, 13 Nov 2017 14:26:39 -0500 Subject: Re: [PATCH] mm: show stats for non-default hugepage sizes in /proc/meminfo To: Johannes Weiner , Roman Gushchin Cc: Dave Hansen , linux-mm@kvack.org, Andrew Morton , Michal Hocko , "Aneesh Kumar K.V" , Andrea Arcangeli , kernel-team@fb.com, linux-kernel@vger.kernel.org References: <20171113160302.14409-1-guro@fb.com> <8aa63aee-cbbb-7516-30cf-15fcf925060b@intel.com> <20171113181105.GA27034@castle> <2579a26d-81d1-732e-ef57-33bb4c293cd6@oracle.com> <20171113184454.GA18531@castle> <20171113191056.GA28749@cmpxchg.org> From: Mike Kravetz Message-ID: <0842738c-1c6f-9a29-b9a6-21e5af898c31@oracle.com> Date: Mon, 13 Nov 2017 11:25:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171113191056.GA28749@cmpxchg.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/13/2017 11:10 AM, Johannes Weiner wrote: > On Mon, Nov 13, 2017 at 06:45:01PM +0000, Roman Gushchin wrote: >> Or, at least, some total counter, e.g. how much memory is consumed >> by hugetlb pages? > > I'm not a big fan of the verbose breakdown for every huge page size. > As others have pointed out such detail exists elswhere. > > But I do think we should have a summary counter for memory consumed by > hugetlb that lets you know how much is missing from MemTotal. This can > be large parts of overall memory, and right now /proc/meminfo will > give the impression we are leaking those pages. > > Maybe a simple summary counter for everything set aside by the hugetlb > subsystem - default and non-default page sizes, whether they're used > or only reserved etc.? > > Hugetlb 12345 kB I would prefer this approach. The 'trick' is coming up with a name or description that is not confusing. Unfortunately, we have to leave the existing entries. So, this new entry will be greater than or equal to HugePages_Total. :( I guess Hugetlb is as good of a name as any? -- Mike Kravetz