Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756318AbbHYXXi (ORCPT ); Tue, 25 Aug 2015 19:23:38 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33761 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755248AbbHYXXg (ORCPT ); Tue, 25 Aug 2015 19:23:36 -0400 Date: Tue, 25 Aug 2015 16:23:34 -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: <20150824085127.GB17078@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> 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: 1169 Lines: 27 On Mon, 24 Aug 2015, Michal Hocko wrote: > The current implementation makes me worry. Is the per hstate break down > really needed? The implementation would be much more easier without it. > Yes, it's needed. It provides a complete picture of what statically reserved hugepages are in use and we're not going to change the implementation when it is needed to differentiate between variable hugetlb page sizes that risk breaking existing userspace parsers. > If you have 99% of hugetlb pages then your load is rather specific and I > would argue that /proc//smaps (after patch 1) is a much better way to > get what you want. > Some distributions change the permissions of smaps, as already stated, for pretty clear security reasons since it can be used to defeat existing protection. There's no reason why hugetlb page usage should not be exported in the same manner and location as memory usage. Sheesh. -- 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/