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]
Message-ID: <20191125033930.GA28301@chenyu-office.sh.intel.com>
Date:   Mon, 25 Nov 2019 11:39:30 +0800
From:   Yu Chen <yu.c.chen@...el.com>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     x86@...nel.org, Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Chen Yu <yu.chen.surf@...il.com>
Subject: Re: [PATCH][v4] x86/resctrl: Add task resctrl information display

Hi Alexey,
thanks for looking at this patch.
On Sun, Nov 24, 2019 at 04:25:13PM +0300, Alexey Dobriyan wrote:
> On Fri, Nov 22, 2019 at 05:58:33PM +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}/resctrl to provide this
> > information.
> 
> > --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> > +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> 
> > +		seq_printf(s, "/%s", rdtg->kn->name);
> > +		list_for_each_entry(crg, &rdtg->mon.crdtgrp_list,
> > +				    mon.crdtgrp_list) {
> > +			if (tsk->rmid != crg->mon.rmid)
> > +				continue;
> > +			seq_printf(s, "%smon_groups/%s",
> > +				   rdtg == &rdtgroup_default ? "" : "/",
> > +				   crg->kn->name);
> > +			break;
> > +		}
> > +		seq_puts(s, "\n");
> 
> This should be seq_putc().
> 
> 
Okay, changed in next version.
> > --- /dev/null
> > +++ b/include/linux/resctrl.h
> > @@ -0,0 +1,16 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +#ifndef _RESCTRL_H
> > +#define _RESCTRL_H
> > +
> > +#ifdef CONFIG_PROC_CPU_RESCTRL
> > +
> > +#include <linux/proc_fs.h>
> 
> Forward declaring stuff should be more than enough.
> 
Okay, deleted in next version.
Then after removing this header, the .c files(besides proc/fs/base.c)
who include resctrl.h should be responsible to import corresondling
headers themselves.

Thanks,
Chenyu
> > +int proc_resctrl_show(struct seq_file *m,
> > +		      struct pid_namespace *ns,
> > +		      struct pid *pid,
> > +		      struct task_struct *tsk);
> > +
> > +#endif
> > +
> > +#endif /* _RESCTRL_H */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ