From: Borislav Petkov <bp@alien8.de>
To: Ryan Chen <yu.chen.surf@gmail.com>
Cc: Chen Yu <yu.c.chen@intel.com>,
the arch/x86 maintainers <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will@kernel.org>, Fenghua Yu <fenghua.yu@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>,
Tony Luck <tony.luck@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
Michal Hocko <mhocko@suse.com>, Kees Cook <keescook@chromium.org>,
Christian Brauner <christian@brauner.io>,
Shakeel Butt <shakeelb@google.com>,
Casey Schaufler <casey@schaufler-ca.com>,
Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
Kent Overstreet <kent.overstreet@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2][v2] x86/resctrl: Add task resctrl information display
Date: Mon, 18 Nov 2019 15:48:07 +0100 [thread overview]
Message-ID: <20191118144807.GE6363@zn.tnic> (raw)
In-Reply-To: <CADjb_WR_DNAR_4jVEJ1C4LO7Xfnc54J2u2AoqyCjZT39+AhrWA@mail.gmail.com>
On Sat, Nov 16, 2019 at 11:01:12PM +0800, Ryan Chen wrote:
> Right, we can return 'blank' to user and let the user to parse the information.
There is nothing to parse - the task doesn't belong to any groups. That's it.
> And there is a similar behavior in cgroup that, for kernel thread that
> does not belong
> to any cgroup, /proc/{pid}/cgroup just show 'blank' without returning an error.
By 'blank' I assume you mean the empty string '' ?
> Yes, only when PROC_FS is set, /proc/{pid}/resctrl
> can be displayed. However, CPU_RESCTRL might not
> depend on proc fs, it is possible that the CPU_RESCTRL
> is enabled but without PROC_FS set. If I understand correctly,
> CPU_RESCTRL is the 'root' config for X86_CPU_RESCTRL,
> after reading this thread:
> https://lists.gt.net/linux/kernel/3211659
I'm not sure I know what you mean here. There's no CPU_RESCTRL option - you've
added it in the previous patch:
[ ~/kernel/linux> git grep -E CONFIG_CPU_RESCTRL
[ ~/kernel/linux> git grep -E "\WCPU_RESCTRL"
[ ~/kernel/linux>
And if you want to use that option in proc/, then it needs
to depend on PROC_FS, like the the example I gave you with
CONFIG_PROC_PID_ARCH_STATUS.
Or do you mean something else?
> If this is the case, shall we add the new file at kernel/resctrl/resctrl.c?
> And the generic proc_resctrl_show() could be put into this file. In the future
> the generic code for resctrl could be added/moved to kernel/resctrl/resctrl.c
Not worth it for a single function. Leave it in
arch/x86/kernel/cpu/resctrl/rdtgroup.c where you had it.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2019-11-18 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 5:23 [PATCH 0/2][v2] Add task resctrl information in procfs Chen Yu
2019-11-15 5:24 ` [PATCH 1/2][v2] resctrl: Add CPU_RESCTRL Chen Yu
2019-11-15 8:46 ` Borislav Petkov
2019-11-15 5:25 ` [PATCH 2/2][v2] x86/resctrl: Add task resctrl information display Chen Yu
2019-11-15 9:24 ` Borislav Petkov
2019-11-16 15:01 ` Ryan Chen
2019-11-18 14:48 ` Borislav Petkov [this message]
2019-11-20 7:54 ` Yu Chen
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=20191118144807.GE6363@zn.tnic \
--to=bp@alien8.de \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=casey@schaufler-ca.com \
--cc=christian@brauner.io \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=kent.overstreet@gmail.com \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=shakeelb@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
--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 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).