From: Yu Chen <yu.c.chen@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Reinette Chatre <reinette.chatre@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Tony Luck <tony.luck@intel.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Alexey Dobriyan <adobriyan@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] x86/resctrl: Add task resctrl information display
Date: Fri, 15 Nov 2019 12:24:11 +0800 [thread overview]
Message-ID: <20191115042411.GA11061@chenyu-office.sh.intel.com> (raw)
In-Reply-To: <20191113182306.GB1647@zn.tnic>
Hi Boris,
Thanks for looking at the patch.
On Wed, Nov 13, 2019 at 07:23:07PM +0100, Borislav Petkov wrote:
> On Thu, Nov 07, 2019 at 11:27:31AM +0800, Chen Yu wrote:
> > Monitoring tools that want to find out which resctrl CTRL
> > 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.
> >
> > For example:
> > cat /proc/1193/resctrl
> > CTRL_MON:/ctrl_grp0
> > MON:/ctrl_grp0/mon_groups/mon_grp0
> >
> > If the resctrl filesystem has not been mounted,
> > reading /proc/{pid}/resctrl returns an error:
> > cat: /proc/1193/resctrl: No such device
> >
> > Tested-by: Jinshi Chen <jinshi.chen@intel.com>
> > Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
> > Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
> > Reviewed-by: Tony Luck <tony.luck@intel.com>
> > Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> >
> > ---
> > arch/x86/include/asm/resctrl_sched.h | 4 +++
> > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 46 ++++++++++++++++++++++++++
> > fs/proc/base.c | 9 +++++
> ^^^^^^^^^^^^^^^
>
> So you're touching this file here and yet your Cc list doesn't have
> *anyone* who might be responsible for the proc fs (yeah, you have
> linux-fsdevel but I don't think that's enough). Have you heard of
> scripts/get_maintainer.pl?
>
> Use it in the future.
>
> Cc-ing some more people for the generic /proc bits.
>
Okay, thanks.
> > 3 files changed, 59 insertions(+)
> >
> > +
> > + if (rdtg->closid == tsk->closid) {
>
> Save an indentation level:
>
> if (rdtg->closid != tsk->closid)
> continue;
>
> seq_printf...
>
Okay.
> > +#ifdef CONFIG_X86_CPU_RESCTRL
> > +#include <asm/resctrl_sched.h>
> > +#endif
>
> If anything, this should be abstracted nicely into an
> include/linux/resctrl.h header. Other architectures would probably wanna
> use it too, I hear ARM64 has something like resctrl.
>
Okay, created this header in the next version.
> > +#endif
> > +#ifdef CONFIG_X86_CPU_RESCTRL
> > + ONE("resctrl", S_IRUGO, proc_resctrl_show),
> > #endif
>
> Same here. proc_resctrl_show() looks like a generic function but it
> is x86-only. Need to call the x86-specific one in a real generic
> proc_resctrl_show() which other arches can add their code to, too.
>
> Not like that.
>
Okay, in next version proc_resctrl_show() is declared in resctrl.h.
However since there's no common c source file for resctrl currently,
different architectures might need to implement proc_resctrl_show()
accordingly - currently only x86 needs to do that.
Thanks,
Chenyu
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2019-11-15 4:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 3:27 [PATCH] x86/resctrl: Add task resctrl information display Chen Yu
2019-11-13 18:23 ` Borislav Petkov
2019-11-15 4:24 ` Yu Chen [this message]
2019-11-15 8:45 ` Borislav Petkov
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=20191115042411.GA11061@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=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 \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).