From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754628AbcIMU2C (ORCPT ); Tue, 13 Sep 2016 16:28:02 -0400 Received: from mail-yb0-f173.google.com ([209.85.213.173]:34479 "EHLO mail-yb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbcIMU2A (ORCPT ); Tue, 13 Sep 2016 16:28:00 -0400 MIME-Version: 1.0 In-Reply-To: <20160913071208.GC31898@dhcp22.suse.cz> 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> From: Sonny Rao Date: Tue, 13 Sep 2016 13:27:39 -0700 X-Google-Sender-Auth: 6wQaIis802wC0NuQgo2Omz4GOIA Message-ID: Subject: Re: [PATCH v5 0/3] mm, proc: Implement /proc//totmaps To: Michal Hocko Cc: Robert Foss , 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 Tue, Sep 13, 2016 at 12:12 AM, Michal Hocko wrote: > On Mon 12-09-16 10:28:53, Sonny Rao wrote: >> On Mon, Sep 12, 2016 at 10:15 AM, Michal Hocko wrote: >> > On Mon 12-09-16 08:31:36, Sonny Rao wrote: > [...] >> >> but how about the other fields like Swap, Private_Dirty and >> >> Private_Shared? >> > >> > Private_Shared can be pretty confusing as well without the whole context >> > as well see my other emails in the original thread (just to remind >> > shmem/tmpfs makes all this really confusing). >> >> But this is exactly the issue -- RSS is can be just as confusing if >> you don't know something about the application. > > I agree that rss can be confusing but we will not make the situation any > better if we add yet another confusing metric. > >> I think the issue is >> how common that situation is, and you seem to believe that it's so >> uncommon that it's actually better to keep the information more >> difficult to get for those of us who know something about our systems. >> >> That's fine, I guess we just have to disagree here, thanks for look at this. > > I think you should just step back and think more about what exactly > you expect from the counter(s). I believe what you want is an > estimate of a freeable memory when the particular process dies or is > killed. That would mean resident single mapped private anonymous memory > + unlinked single mapped shareable mappings + single mapped swapped out > memory. Maybe I've missed something but it should be something along > those lines. Definitely something that the current smaps infrastructure > doesn't give you, though. Yes your description of what we want is pretty good. Having a reasonable lower bound on the estimate is fine, though we probably want to break out swapped out memory separately. Given that smaps doesn't provide this in a straightforward way, what do you think is the right way to provide this information? > -- > Michal Hocko > SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sonny Rao Subject: Re: [PATCH v5 0/3] mm, proc: Implement /proc//totmaps Date: Tue, 13 Sep 2016 13:27:39 -0700 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20160913071208.GC31898@dhcp22.suse.cz> Sender: linux-kernel-owner@vger.kernel.org To: Michal Hocko Cc: Robert Foss , 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 List-Id: linux-api@vger.kernel.org On Tue, Sep 13, 2016 at 12:12 AM, Michal Hocko wrote: > On Mon 12-09-16 10:28:53, Sonny Rao wrote: >> On Mon, Sep 12, 2016 at 10:15 AM, Michal Hocko wrote: >> > On Mon 12-09-16 08:31:36, Sonny Rao wrote: > [...] >> >> but how about the other fields like Swap, Private_Dirty and >> >> Private_Shared? >> > >> > Private_Shared can be pretty confusing as well without the whole context >> > as well see my other emails in the original thread (just to remind >> > shmem/tmpfs makes all this really confusing). >> >> But this is exactly the issue -- RSS is can be just as confusing if >> you don't know something about the application. > > I agree that rss can be confusing but we will not make the situation any > better if we add yet another confusing metric. > >> I think the issue is >> how common that situation is, and you seem to believe that it's so >> uncommon that it's actually better to keep the information more >> difficult to get for those of us who know something about our systems. >> >> That's fine, I guess we just have to disagree here, thanks for look at this. > > I think you should just step back and think more about what exactly > you expect from the counter(s). I believe what you want is an > estimate of a freeable memory when the particular process dies or is > killed. That would mean resident single mapped private anonymous memory > + unlinked single mapped shareable mappings + single mapped swapped out > memory. Maybe I've missed something but it should be something along > those lines. Definitely something that the current smaps infrastructure > doesn't give you, though. Yes your description of what we want is pretty good. Having a reasonable lower bound on the estimate is fine, though we probably want to break out swapped out memory separately. Given that smaps doesn't provide this in a straightforward way, what do you think is the right way to provide this information? > -- > Michal Hocko > SUSE Labs