lkml.org 
[lkml]   [2021]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2] taskstats: add /proc/taskstats to fetch pid/tgid status
On Fri, Jan 22, 2021 at 10:07:50PM +0800, Weiping Zhang wrote:
> Hello Balbir Singh,
>
> Could you help review this patch, thanks
>
> On Mon, Dec 28, 2020 at 10:10 PM Weiping Zhang <zwp10758@gmail.com> wrote:
> >
> > Hi David,
> >
> > Could you help review this patch ?
> >
> > thanks
> >
> > On Fri, Dec 18, 2020 at 1:24 AM Weiping Zhang
> > <zhangweiping@didiglobal.com> wrote:
> > >
> > > If a program needs monitor lots of process's status, it needs two
> > > syscalls for every process. The first one is telling kernel which
> > > pid/tgid should be monitored by send a command(write socket) to kernel.
> > > The second one is read the statistics by read socket. This patch add
> > > a new interface /proc/taskstats to reduce two syscalls to one ioctl.
> > > The user just set the target pid/tgid to the struct taskstats.ac_pid,
> > > then kernel will collect statistics for that pid/tgid.
> > >
> > > Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>

Could you elaborate on the overhead your seeing for the syscalls? I am not
in favour of adding new IOCTL's.

Balbir Singh.

\
 
 \ /
  Last update: 2021-01-27 12:17    [W:1.373 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site