Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750827AbbG2TIK (ORCPT ); Wed, 29 Jul 2015 15:08:10 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:32851 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbbG2TII (ORCPT ); Wed, 29 Jul 2015 15:08:08 -0400 Date: Wed, 29 Jul 2015 12:08:05 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: =?UTF-8?Q?J=C3=B6rn_Engel?= cc: Mike Kravetz , "linux-mm@kvack.org" , linux-kernel Subject: Re: hugetlb pages not accounted for in rss In-Reply-To: <20150729005332.GB17938@Sligo.logfs.org> Message-ID: References: <55B6BE37.3010804@oracle.com> <20150728183248.GB1406@Sligo.logfs.org> <55B7F0F8.8080909@oracle.com> <20150728222654.GA28456@Sligo.logfs.org> <20150729005332.GB17938@Sligo.logfs.org> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="397176738-1464267060-1438196886=:24373" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1565 Lines: 34 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --397176738-1464267060-1438196886=:24373 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT On Tue, 28 Jul 2015, J?rn Engel wrote: > Well, we definitely need something. Having a 100GB process show 3GB of > rss is not very useful. How would we notice a memory leak if it only > affects hugepages, for example? > Since the hugetlb pool is a global resource, it would also be helpful to determine if a process is mapping more than expected. You can't do that just by adding a huge rss metric, however: if you have 2MB and 1GB hugepages configured you wouldn't know if a process was mapping 512 2MB hugepages or 1 1GB hugepage. That's the purpose of hugetlb_cgroup, after all, and it supports usage counters for all hstates. The test could be converted to use that to measure usage if configured in the kernel. Beyond that, I'm not sure how a per-hstate rss metric would be exported to userspace in a clean way and other ways of obtaining the same data are possible with hugetlb_cgroup. I'm not sure how successful you'd be in arguing that we need separate rss counters for it. --397176738-1464267060-1438196886=:24373-- -- 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/