public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: James Morse <james.morse@arm.com>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	H Peter Anvin <hpa@zytor.com>, Babu Moger <Babu.Moger@amd.com>,
	<shameerali.kolothum.thodi@huawei.com>,
	D Scott Phillips OS <scott@os.amperecomputing.com>,
	<carl@os.amperecomputing.com>, <lcherian@marvell.com>,
	<bobo.shaobowang@huawei.com>, <tan.shaopeng@fujitsu.com>,
	<baolin.wang@linux.alibaba.com>,
	Jamie Iles <quic_jiles@quicinc.com>,
	Xin Hao <xhao@linux.alibaba.com>, <peternewman@google.com>,
	<dfustini@baylibre.com>, <amitsinght@marvell.com>,
	David Hildenbrand <david@redhat.com>,
	Rex Nie <rex.nie@jaguarmicro.com>,
	Dave Martin <dave.martin@arm.com>,
	Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Subject: Re: [PATCH v3 36/38] fs/resctrl: Add boiler plate for external resctrl code
Date: Mon, 8 Jul 2024 10:47:12 -0700	[thread overview]
Message-ID: <ea8692da-b3b9-4299-aced-bd4e03edd030@intel.com> (raw)
In-Reply-To: <a7122237-969d-4757-8c93-af261a8d69d1@arm.com>

Hi James,

On 7/4/24 9:40 AM, James Morse wrote:
> Hi Reinette,
> 
> On 28/06/2024 17:54, Reinette Chatre wrote:
>> On 6/14/24 8:00 AM, James Morse wrote:
>>> Add Makefile and Kconfig for fs/resctrl. Add ARCH_HAS_CPU_RESCTRL
>>> for the common parts of the resctrl interface and make X86_CPU_RESCTRL
>>> depend on this.
>>>
>>> Adding an include of asm/resctrl.h to linux/resctrl.h allows some
>>> of the files to switch over to using this header instead.
> 
> 
>>> diff --git a/fs/resctrl/Kconfig b/fs/resctrl/Kconfig
>>> new file mode 100644
>>> index 000000000000..a5fbda54d32f
>>> --- /dev/null
>>> +++ b/fs/resctrl/Kconfig
>>> @@ -0,0 +1,36 @@
>>> +config RESCTRL_FS
>>> +    bool "CPU Resource Control Filesystem (resctrl)"
>>> +    depends on ARCH_HAS_CPU_RESCTRL
>>> +    select KERNFS
>>> +    select PROC_CPU_RESCTRL if PROC_FS
>>> +    help
>>> +      Some architectures provide hardware facilities to group tasks and
>>> +      monitor and control their usage of memory system resources such as
>>> +      caches and memory bandwidth.  Examples of such facilities include
>>> +      Intel's Resource Director Technology (Intel(R) RDT) and AMD's
>>> +      Platform Quality of Service (AMD QoS).
>>> +
>>> +      If your system has the necessary support and you want to be able to
>>> +      assign tasks to groups and manipulate the associated resource
>>> +      monitors and controls from userspace, say Y here to get a mountable
>>> +      'resctrl' filesystem that lets you do just that.
>>> +
>>> +      If nothing mounts or prods the 'resctrl' filesystem, resource
>>> +      controls and monitors are left in a quiescent, permissive state.
>>> +
>>> +      If unsure, it is safe to say N.
>>> +
>>
>> Will user ever get opportunity to say "Y" or "N"?
>> It looks to me that
>> RESCTRL_FS will be "forced" on user as it is selected by the arch specific
>> config X86_CPU_RESCTRL and be invisble otherwise because of the dependency
>> on ARCH_HAS_CPU_RESCTRL.
> 
> I did it like this so that this change is invisible for x86 config files on the principle
> of 'least noise'. Users can't enable RDT but disable resctrl today.
> It isn't actually possible to enable RDT and disable resctrl until after the code has been
> split from the architecture code.
> 
> I have ended up supporting this for MPAM - you can enable the architecture's MPAM code and
> the driver, but not resctrl. This will eventually be for in-kernel users of resources that
> resctrl doesn't understand.
> 
> 
>> The text about when to select "Y" or "N" thus does
>> not look practical to me and it may be helpful to instead provide
>> information about when it is selected? I do not know the customs for this
>> text and if it is intended to document any future usages also.
> 
> I think Dave wrote this text because its traditional for Kconfig options to say this.
> 
> Describing when it is selected gets messy as this varies by architecture, and Kconfig can
> already tell you this:
> | Selected by [y]:
> │   - X86_CPU_RESCTRL [=y] && X86 [=y] && (CPU_SUP_INTEL [=y] || CPU_SUP_AMD [=y]) &&
> MISC_FILESYSTEMS [=y]

Right.

> 
> I don't think it makes sense for resctrl to be enabled/disabled independently on x86.

I was not asking for resctrl to be enabled/disabled independently on x86. I commented on this
patch that adds text to guide user for options that the user is never able to select.

> If you want to support this, we need a few more IS_ENABLED() checks and stubs to make it

I did not intend to suggest this at all.

> build. The only reason I can see to do it is to ensure the architecture code is self
> contained.
> 
> I'll reword this as "On architectures where this can be disabled independently, it is safe
> to say N".

ok

Reinette

  reply	other threads:[~2024-07-08 17:47 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 14:59 [PATCH v3 00/38] x86/resctrl: Move the resctrl filesystem code to /fs/resctrl James Morse
2024-06-14 14:59 ` [PATCH v3 01/38] x86/resctrl: Fix allocation of cleanest CLOSID on platforms with no monitors James Morse
2024-06-28 16:41   ` Reinette Chatre
2024-06-14 14:59 ` [PATCH v3 02/38] x86/resctrl: Add a helper to avoid reaching into the arch code resource list James Morse
2024-06-28 16:42   ` Reinette Chatre
2024-06-14 14:59 ` [PATCH v3 03/38] x86/resctrl: Add a schema format enum and use this for fflags James Morse
2024-06-28 16:43   ` Reinette Chatre
2024-07-01 18:17     ` James Morse
2024-07-01 21:09       ` Reinette Chatre
2024-08-02 17:24         ` James Morse
2024-06-14 14:59 ` [PATCH v3 04/38] x86/resctrl: Use schema type to determine how to parse schema values James Morse
2024-06-28 16:43   ` Reinette Chatre
2024-06-14 15:00 ` [PATCH v3 05/38] x86/resctrl: Use schema type to determine the schema format string James Morse
2024-06-28 16:43   ` Reinette Chatre
2024-06-14 15:00 ` [PATCH v3 06/38] x86/resctrl: Move data_width to be a schema property James Morse
2024-06-28 16:45   ` Reinette Chatre
2024-06-14 15:00 ` [PATCH v3 07/38] x86/resctrl: Add max_bw to struct resctrl_membw James Morse
2024-06-14 15:00 ` [PATCH v3 08/38] x86/resctrl: Generate default_ctrl instead of sharing it James Morse
2024-06-14 15:00 ` [PATCH v3 09/38] x86/resctrl: Add helper for setting CPU default properties James Morse
2024-06-14 15:00 ` [PATCH v3 10/38] x86/resctrl: Remove rdtgroup from update_cpu_closid_rmid() James Morse
2024-06-14 15:00 ` [PATCH v3 11/38] x86/resctrl: Export resctrl fs's init function James Morse
2024-06-14 15:00 ` [PATCH v3 12/38] x86/resctrl: Wrap resctrl_arch_find_domain() around rdt_find_domain() James Morse
2024-06-14 15:00 ` [PATCH v3 13/38] x86/resctrl: Move resctrl types to a separate header James Morse
2024-06-28 16:45   ` Reinette Chatre
2024-07-01 18:16     ` James Morse
2024-06-14 15:00 ` [PATCH v3 14/38] x86/resctrl: Add a resctrl helper to reset all the resources James Morse
2024-06-14 15:00 ` [PATCH v3 15/38] x86/resctrl: Move monitor exit work to a restrl exit call James Morse
2024-06-28 16:46   ` Reinette Chatre
2024-07-01 18:17     ` James Morse
2024-07-11 21:12   ` Carl Worth
2024-06-14 15:00 ` [PATCH v3 16/38] x86/resctrl: Move monitor init work to a resctrl init call James Morse
2024-06-28 16:47   ` Reinette Chatre
2024-07-01 18:17     ` James Morse
2024-07-01 21:11       ` Reinette Chatre
2024-08-02 17:23         ` James Morse
2024-06-14 15:00 ` [PATCH v3 17/38] x86/resctrl: Stop using the for_each_*_rdt_resource() walkers James Morse
2024-06-28 16:48   ` Reinette Chatre
2024-07-01 18:16     ` James Morse
2024-07-01 21:10       ` Reinette Chatre
2024-08-02 17:22         ` James Morse
2024-06-14 15:00 ` [PATCH v3 18/38] x86/resctrl: Export the is_mbm_*_enabled() helpers to asm/resctrl.h James Morse
2024-06-14 15:00 ` [PATCH v3 19/38] x86/resctrl: Add resctrl_arch_is_evt_configurable() to abstract BMEC James Morse
2024-06-14 15:00 ` [PATCH v3 20/38] x86/resctrl: Change mon_event_config_{read,write}() to be arch helpers James Morse
2024-06-28 16:49   ` Reinette Chatre
2024-06-14 15:00 ` [PATCH v3 21/38] x86/resctrl: Move mbm_cfg_mask to struct rdt_resource James Morse
2024-06-28 16:53   ` Reinette Chatre
2024-06-14 15:00 ` [PATCH v3 22/38] x86/resctrl: Add resctrl_arch_ prefix to pseudo lock functions James Morse
2024-06-14 15:00 ` [PATCH v3 23/38] x86/resctrl: Allow an architecture to disable pseudo lock James Morse
2024-07-11 21:33   ` Carl Worth
2024-08-02 17:22     ` James Morse
2024-06-14 15:00 ` [PATCH v3 24/38] x86/resctrl: Make prefetch_disable_bits belong to the arch code James Morse
2024-06-14 15:00 ` [PATCH v3 25/38] x86/resctrl: Make resctrl_arch_pseudo_lock_fn() take a plr James Morse
2024-06-14 15:00 ` [PATCH v3 26/38] x86/resctrl: Move thread_throttle_mode_init() to be managed by resctrl James Morse
2024-06-14 15:00 ` [PATCH v3 27/38] x86/resctrl: Move get_config_index() to a header James Morse
2024-06-14 15:00 ` [PATCH v3 28/38] x86/resctrl: Claim get_domain_from_cpu() for resctrl James Morse
2024-06-14 15:00 ` [PATCH v3 29/38] x86/resctrl: Describe resctrl's bitmap size assumptions James Morse
2024-06-14 15:00 ` [PATCH v3 30/38] x86/resctrl: Rename resctrl_sched_in() to begin with "resctrl_arch_" James Morse
2024-06-14 15:00 ` [PATCH v3 31/38] x86/resctrl: resctrl_exit() teardown resctrl but leave the mount point James Morse
2024-06-28 16:53   ` Reinette Chatre
2024-07-04 16:41     ` James Morse
2024-07-08 17:47       ` Reinette Chatre
2024-08-02 17:28         ` James Morse
2024-06-14 15:00 ` [PATCH v3 32/38] x86/resctrl: Drop __init/__exit on assorted symbols James Morse
2024-06-14 15:00 ` [PATCH v3 33/38] x86/resctrl: Move is_mba_sc() out of core.c James Morse
2024-06-14 15:00 ` [PATCH v3 34/38] x86/resctrl: Add end-marker to the resctrl_event_id enum James Morse
2024-06-14 15:00 ` [PATCH v3 35/38] x86/resctrl: Remove a newline to avoid confusing the code move script James Morse
2024-06-14 15:00 ` [PATCH v3 36/38] fs/resctrl: Add boiler plate for external resctrl code James Morse
2024-06-28 16:54   ` Reinette Chatre
2024-07-04 16:40     ` James Morse
2024-07-08 17:47       ` Reinette Chatre [this message]
2024-06-14 15:00 ` [PATCH v3 37/38] x86/resctrl: Move the filesystem bits to headers visible to fs/resctrl James Morse
2024-06-28 17:04   ` Reinette Chatre
2024-06-14 15:00 ` [PATCH v3 38/38] x86/resctrl: Add python script to move resctrl code to /fs/resctrl James Morse
2024-07-11 22:00 ` [PATCH v3 00/38] x86/resctrl: Move the resctrl filesystem " Carl Worth
2024-08-02 17:22   ` James Morse

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=ea8692da-b3b9-4299-aced-bd4e03edd030@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=Babu.Moger@amd.com \
    --cc=amitsinght@marvell.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bobo.shaobowang@huawei.com \
    --cc=bp@alien8.de \
    --cc=carl@os.amperecomputing.com \
    --cc=dave.martin@arm.com \
    --cc=david@redhat.com \
    --cc=dfustini@baylibre.com \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peternewman@google.com \
    --cc=quic_jiles@quicinc.com \
    --cc=rex.nie@jaguarmicro.com \
    --cc=scott@os.amperecomputing.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=tan.shaopeng@fujitsu.com \
    --cc=tan.shaopeng@jp.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xhao@linux.alibaba.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