[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160919193238.GA28639@dhcp22.suse.cz>
Date: Mon, 19 Sep 2016 21:32:38 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Robert Foss <robert.foss@...labora.com>
Cc: Sonny Rao <sonnyrao@...omium.org>,
Jonathan Corbet <corbet@....net>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Hugh Dickins <hughd@...gle.com>,
Konstantin Khlebnikov <koct9i@...il.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
John Stultz <john.stultz@...aro.org>,
Minchan Kim <minchan@...nel.org>, ross.zwisler@...ux.intel.com,
jmarchan@...hat.com, Johannes Weiner <hannes@...xchg.org>,
Kees Cook <keescook@...omium.org>, oleg@...hat.com,
Al Viro <viro@...iv.linux.org.uk>,
Mateusz Guzik <mguzik@...hat.com>,
Janis Danisevskis <jdanis@...gle.com>, calvinowens@...com,
Alexey Dobriyan <adobriyan@...il.com>, ebiederm@...ssion.com,
Seth Forshee <seth.forshee@...onical.com>,
Djalal Harouni <tixxdz@...il.com>, linux-doc@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ben Zhang <benzh@...omium.org>,
Bryan Freed <bfreed@...omium.org>,
Filipe Brandenburger <filbranden@...omium.org>,
Jann Horn <jann@...jh.net>, linux-api@...r.kernel.org,
Jacek Anaszewski <j.anaszewski@...sung.com>
Subject: Re: [PATCH v5 0/3] mm, proc: Implement /proc/<pid>/totmaps
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/<pid>/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.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists