[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160809165840.GA18881@p183.telecom.by>
Date: Tue, 9 Aug 2016 19:58:40 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: robert.foss@...labora.com
Cc: akpm@...ux-foundation.org, keescook@...omium.org,
viro@...iv.linux.org.uk, gorcunov@...nvz.org,
john.stultz@...aro.org, plaguedbypenguins@...il.com,
sonnyrao@...omium.org, mguzik@...hat.com, jdanis@...gle.com,
calvinowens@...com, jann@...jh.net, mhocko@...e.com,
koct9i@...il.com, vbabka@...e.cz, n-horiguchi@...jp.nec.com,
kirill.shutemov@...ux.intel.com, ldufour@...ux.vnet.ibm.com,
hannes@...xchg.org, linux-kernel@...r.kernel.org,
Ben Zhang <benzh@...omium.org>,
Bryan Freed <bfreed@...omium.org>,
Filipe Brandenburger <filbranden@...omium.org>
Subject: Re: [PACTH v1] mm, proc: Implement /proc/<pid>/totmaps
On Tue, Aug 09, 2016 at 12:05:43PM -0400, robert.foss@...labora.com wrote:
> From: Sonny Rao <sonnyrao@...omium.org>
>
> This is based on earlier work by Thiago Goncales. It implements a new
> per process proc file which summarizes the contents of the smaps file
> but doesn't display any addresses. It gives more detailed information
> than statm like the PSS (proprotional set size). It differs from the
> original implementation in that it doesn't use the full blown set of
> seq operations, uses a different termination condition, and doesn't
> displayed "Locked" as that was broken on the original implemenation.
>
> This new proc file provides information faster than parsing the potentially
> huge smaps file.
You can "parse" /proc/*/pagemap . RSS, swap are there.
So which ones do you really need?
Why the separate anon hugepages and anon regular pages?
> + seq_printf(m,
> + "Rss: %8lu kB\n"
> + "Pss: %8lu kB\n"
> + "Shared_Clean: %8lu kB\n"
> + "Shared_Dirty: %8lu kB\n"
> + "Private_Clean: %8lu kB\n"
> + "Private_Dirty: %8lu kB\n"
> + "Referenced: %8lu kB\n"
> + "Anonymous: %8lu kB\n"
> + "AnonHugePages: %8lu kB\n"
> + "Swap: %8lu kB\n",
> + mss_sum->resident >> 10,
> + (unsigned long)(mss_sum->pss >> (10 + PSS_SHIFT)),
> + mss_sum->shared_clean >> 10,
> + mss_sum->shared_dirty >> 10,
> + mss_sum->private_clean >> 10,
> + mss_sum->private_dirty >> 10,
> + mss_sum->referenced >> 10,
> + mss_sum->anonymous >> 10,
> + mss_sum->anonymous_thp >> 10,
> + mss_sum->swap >> 10);
Powered by blists - more mailing lists