From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753572AbcITAhX (ORCPT ); Mon, 19 Sep 2016 20:37:23 -0400 Received: from mail-yb0-f180.google.com ([209.85.213.180]:34794 "EHLO mail-yb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753312AbcITAhV (ORCPT ); Mon, 19 Sep 2016 20:37:21 -0400 MIME-Version: 1.0 In-Reply-To: <2bfaecf2-bf68-48b2-8a88-6e8997c229db@collabora.com> References: <1473106449-12847-1-git-send-email-robert.foss@collabora.com> <20160912120248.GK14524@dhcp22.suse.cz> <20160912171503.GB14997@dhcp22.suse.cz> <20160913071208.GC31898@dhcp22.suse.cz> <20160914091205.GD1612@dhcp22.suse.cz> <0769f0c7-7869-2b0f-faac-3b5cbdb6e401@collabora.com> <20160919193238.GA28639@dhcp22.suse.cz> <2bfaecf2-bf68-48b2-8a88-6e8997c229db@collabora.com> From: Sonny Rao Date: Mon, 19 Sep 2016 17:29:56 -0700 X-Google-Sender-Auth: 7J_8ghsSwW6mtRXIPcMOarZ3Vsc Message-ID: Subject: Re: [PATCH v5 0/3] mm, proc: Implement /proc//totmaps To: Robert Foss Cc: Michal Hocko , Jonathan Corbet , Andrew Morton , Vlastimil Babka , Hugh Dickins , Konstantin Khlebnikov , Naoya Horiguchi , "Kirill A. Shutemov" , John Stultz , Minchan Kim , ross.zwisler@linux.intel.com, jmarchan@redhat.com, Johannes Weiner , Kees Cook , oleg@redhat.com, Al Viro , Mateusz Guzik , Janis Danisevskis , calvinowens@fb.com, Alexey Dobriyan , ebiederm@xmission.com, Seth Forshee , Djalal Harouni , linux-doc@vger.kernel.org, "linux-kernel@vger.kernel.org" , Ben Zhang , Bryan Freed , Filipe Brandenburger , Jann Horn , linux-api@vger.kernel.org, Jacek Anaszewski Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 19, 2016 at 5:27 PM, Robert Foss wrote: > > > On 2016-09-19 03:32 PM, Michal Hocko wrote: >> >> On Mon 19-09-16 11:16:31, Robert Foss wrote: >>> >>> On 2016-09-14 05:12 AM, Michal Hocko wrote: >>>> >>>> On Tue 13-09-16 13:27:39, Sonny Rao wrote: >> >> [...] >>>>> >>>>> Given that smaps >>>>> doesn't provide this in a straightforward way, what do you think is >>>>> the right way to provide this information? >>>> >>>> >>>> I would be tempted to sneak it into /proc//statm because that looks >>>> like a proper place but getting this information is not for free >>>> performance wise so I am not really sure something that relies on this >>>> file would see unexpected stalls. Maybe this could be worked around by >>>> some caching... I would suggest to check who is actually using this file >>>> (top/ps etc...) >>> >>> >>> What would this caching look like? Can any information be re-used between >>> vma walks? >> >> >> yes basically return the same value if called within HZ or something >> similar. But that assumes that statm latency really matters and it is >> called often enough. > > > Any single application querying more often than HZ, would presumably do so > for accuracy reasons. > However for multiple applications that combined query more often than HZ, > this would most definitely be halpful in terms of performance. > > @Sonny, does chromiumos fall into the first or second category? It's a single application -- and it definitely doesn't query at HZ -- especially given how long it takes to gather the data :-)