lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 15 Jan 2020 00:04:44 +0800
From:   Chen Yu <yu.chen.surf@...il.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Chen Yu <yu.c.chen@...el.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Bhupesh Sharma <bhsharma@...hat.com>,
        Dave Young <dyoung@...hat.com>,
        Aubrey Li <aubrey.li@...ux.intel.com>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Chris Down <chris@...isdown.name>,
        Michal Hocko <mhocko@...e.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-fsdevel@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][v6] x86/resctrl: Add task resctrl information display

Hi Boris,
On Tue, Jan 14, 2020 at 5:25 PM Borislav Petkov <bp@...en8.de> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ