Re: [PATCH][v6] x86/resctrl: Add task resctrl information display

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Boris,
On Tue, Jan 14, 2020 at 5:25 PM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Fri, Jan 10, 2020 at 03:06:08PM +0800, Chen Yu wrote:
> > Monitoring tools that want to find out which resctrl control
> > and monitor groups a task belongs to must currently read
> > the "tasks" file in every group until they locate the process
> > ID.
> >
> > Add an additional file /proc/{pid}/cpu_resctrl to provide this
> > information.
> >
> > The output is as followed, for example:
> >
> >  1)   ""
> >       Resctrl is not available.
> >
> >  2)   "/"
> >       Task is part of the root group, task is not associated to
> >       any monitor group.
> >
> >  3)   "/mon_groups/mon0"
> >       Task is part of the root group and monitor group mon0.
> >
> >  4)   "/group0"
> >       Task is part of resctrl control group group0, task is not
> >       associated to any monitor group.
> >
> >  5)   "/group0/mon_groups/mon1"
> >       Task is part of resctrl control group group0 and monitor
> >       group mon1.
>
> So this way to present the information is totally non-intuitive,
> IMNSVHO. What's wrong with:
>
> 1)
>         res_group:
>         mon_group:
>
> 2)
>         res_group: /
>         mon_group:
>
> 3)
>         res_group: /
>         mon_group: mon0
>
> 4)
>         res_group: group0
>         mon_group:
>
> 5)
>         res_group: group0
>         mon_group: mon1
>
> ?
>
> You can even call the file "cpu_resctrl_groups" so that it is clear that
> it will dump groups and then do:
>
>         res: group0
>         mon: mon1
>
> which is both human-readable and easily greppable.
>
Yes, to display resctrl control and monitor group separately might be more
friendly to the user.  Although I was thinking if the user would like
to see the full path of
the resource, which might make it easier to be parsed:
A) res: group0
    mon: mon1
vs
B) res: /group0
    mon: /group0/mon_groups/mon1
as proposal B might introduce duplication I'll send a new version
based on proposal A.
> > +/*
> > + * A task can only be part of one resctrl
> > + * control group and of one monitor
> > + * group which is associated to that resctrl
> > + * control group.
>
> Extend those comments to 80 cols.
>
Okay. will do.
> > + * So one line is simple and clear enough:
>
> Actually, the one line format you've done is confusing and can be done
> much more human- and tool-readable.
>
Got it.
Thanks,
Chenyu

> Thx.
>
> --
> Regards/Gruss,
>     Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux