Re: [PACTH v2 0/3] Implement /proc/<pid>/totmaps

From: Robert Foss
Date: Mon Aug 15 2016 - 09:00:19 EST




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.
But the gist of it is that it provides a faster and more convenient way of accessing the information in /proc/PID/smaps.


Changes since v1:
- Removed IS_ERR check from get_task_mm() function
- Changed comment format
- Moved proc_totmaps_operations declaration inside internal.h
- Switched to using do_maps_open() in totmaps_open() function,
which provides privilege checking
- Error handling reworked for totmaps_open() function
- Switched to stack allocated struct mem_size_stats mss_sum in
totmaps_proc_show() function
- Removed get_task_mm() in totmaps_proc_show() since priv->mm
already is available
- Added support to proc_map_release() fork priv==NULL, to allow
function to be used for all failure cases
- Added proc_totmaps_op and for it helper functions
- Added documention in separate patch
- Removed totmaps_release() since it was just a wrapper for
proc_map_release()


Robert Foss (3):
mm, proc: Implement /proc/<pid>/totmaps
Documentation/filesystems: Fixed typo
Documentation/filesystems: Added /proc/PID/totmaps documentation

Documentation/filesystems/proc.txt | 23 ++++++-
fs/proc/base.c | 1 +
fs/proc/internal.h | 3 +
fs/proc/task_mmu.c | 134 +++++++++++++++++++++++++++++++++++++
4 files changed, 160 insertions(+), 1 deletion(-)

--
2.7.4