All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Chen <yu.c.chen@intel.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>,
	Tony Luck <tony.luck@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Chen Yu <yu.chen.surf@gmail.com>
Subject: Re: [PATCH][v4] x86/resctrl: Add task resctrl information display
Date: Mon, 25 Nov 2019 11:39:30 +0800	[thread overview]
Message-ID: <20191125033930.GA28301@chenyu-office.sh.intel.com> (raw)
In-Reply-To: <20191124132513.GA30453@avx2>

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 */

      reply	other threads:[~2019-11-25  3:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  9:58 [PATCH][v4] x86/resctrl: Add task resctrl information display Chen Yu
2019-11-24 13:25 ` Alexey Dobriyan
2019-11-25  3:39   ` Yu Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191125033930.GA28301@chenyu-office.sh.intel.com \
    --to=yu.c.chen@intel.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yu.chen.surf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.