lkml.org 
[lkml]   [2020]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 0/5] Introduce /proc/all/ to gather stats from all processes
On Mon, 10 Aug 2020 17:04:53 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:
> How many syscalls does this save on?
>
> Perhaps you want my proposed readfile(2) syscall:
> https://lore.kernel.org/r/20200704140250.423345-1-gregkh@linuxfoundation.org
> to help out with things like this? :)

The proposed readfile sounds great and would help, but if there are
1000 processes wouldn't that require 1000 readfile calls to read their
proc files?

With something like this the stats for 1000 processes could be
retrieved with an open, a few reads and a close.

>
> > The proposed files in this proof-of-concept patch set are:
> >
> > * /proc/all/stat
>
> I think the problem will be defining "all" in the case of the specific
> namespace you are dealing with, right? How will this handle all of
> those issues properly for all of these different statisics?
>

Currently I'm trying to re-use the existing code in fs/proc that
controls which PIDs are visible, but may well be missing something..


Best Wishes,
Eugene

\
 
 \ /
  Last update: 2020-08-10 17:37    [W:0.139 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site