Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757033AbbHZWCw (ORCPT ); Wed, 26 Aug 2015 18:02:52 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:32992 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756744AbbHZWCv (ORCPT ); Wed, 26 Aug 2015 18:02:51 -0400 Date: Wed, 26 Aug 2015 15:02:49 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: =?UTF-8?Q?J=C3=B6rn_Engel?= , Naoya Horiguchi , Andrew Morton , Mike Kravetz , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Naoya Horiguchi Subject: Re: [PATCH v5 2/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status In-Reply-To: <20150826063813.GA25196@dhcp22.suse.cz> Message-ID: References: <20150812000336.GB32192@hori1.linux.bs1.fc.nec.co.jp> <1440059182-19798-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1440059182-19798-3-git-send-email-n-horiguchi@ah.jp.nec.com> <20150820110004.GB4632@dhcp22.suse.cz> <20150820233450.GB10807@hori1.linux.bs1.fc.nec.co.jp> <20150821065321.GD23723@dhcp22.suse.cz> <20150821163033.GA4600@Sligo.logfs.org> <20150824085127.GB17078@dhcp22.suse.cz> <20150826063813.GA25196@dhcp22.suse.cz> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="397176738-746873092-1440626014=:19139" Content-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1737 Lines: 38 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-746873092-1440626014=:19139 Content-Type: TEXT/PLAIN; CHARSET=UTF-8 Content-Transfer-Encoding: 8BIT Content-ID: On Wed, 26 Aug 2015, Michal Hocko wrote: > I thought the purpose was to give the amount of hugetlb based > resident memory. Persistent hugetlb memory is always resident, the goal is to show what is currently mapped. > At least this is what Jörn was asking for AFAIU. > /proc//status should be as lightweight as possible. The current > implementation is quite heavy as already pointed out. So I am really > curious whether this is _really_ needed. I haven't heard about a real > usecase except for top displaying HRss which doesn't need the break > down values. You have brought that up already > http://marc.info/?l=linux-mm&m=143941143109335&w=2 and nobody actually > asked for it. "I do not mind having it" is not an argument for inclusion > especially when the implementation is more costly and touches hot paths. > It iterates over HUGE_MAX_HSTATE and reads atomic usage counters twice. On x86, HUGE_MAX_HSTATE == 2. I don't consider that to be expensive. If you are concerned about the memory allocation of struct hugetlb_usage, it could easily be embedded directly in struct mm_struct. --397176738-746873092-1440626014=:19139-- -- 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/