Re: [PACTH v2 0/3] Implement /proc/<pid>/totmaps
From: Michal Hocko
Date: Mon Aug 15 2016 - 09:42:46 EST
On Mon 15-08-16 09:00:04, Robert Foss wrote:
>
>
> On 2016-08-14 05:04 AM, Michal Hocko wrote:
> > On Fri 12-08-16 18:04:19, robert.foss@xxxxxxxxxxxxx wrote:
> > > From: Robert Foss <robert.foss@xxxxxxxxxxxxx>
> > >
> > > This series implements /proc/PID/totmaps, a tool for retrieving summarized
> > > information about the mappings of a process.
> >
> > The changelog is absolutely missing the usecase. Why do we need this?
> > Why existing interfaces are not sufficient?
>
> You are absolutely right, more info information is in 1/3.
Patch 1 is silent about the use case as well. It is usually recommended
to describe the motivation for the change in the cover letter.
> But the gist of it is that it provides a faster and more convenient way of
> accessing the information in /proc/PID/smaps.
I am sorry to insist but this is far from a description I was hoping
for. Why do we need a more convenient API? Please note that this is a
userspace API which we will have to maintain for ever. We have made many
mistakes in the past where exporting some information made sense at the
time while it turned out being a mistake only later on. So let's make
sure we will not fall into the same trap again.
So please make sure you describe the use case, why the current API is
insufficient and why it cannot be tweaked to provide the information you
are looking for.
--
Michal Hocko
SUSE Labs