From: "Moger, Babu" <bmoger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
"Moger, Babu" <Babu.Moger@amd.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>
Cc: "fenghua.yu@intel.com" <fenghua.yu@intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"paulmck@kernel.org" <paulmck@kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"quic_neeraju@quicinc.com" <quic_neeraju@quicinc.com>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
"damien.lemoal@opensource.wdc.com"
<damien.lemoal@opensource.wdc.com>,
"songmuchun@bytedance.com" <songmuchun@bytedance.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"chang.seok.bae@intel.com" <chang.seok.bae@intel.com>,
"pawan.kumar.gupta@linux.intel.com"
<pawan.kumar.gupta@linux.intel.com>,
"jmattson@google.com" <jmattson@google.com>,
"daniel.sneddon@linux.intel.com" <daniel.sneddon@linux.intel.com>,
"Das1, Sandipan" <Sandipan.Das@amd.com>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bagasdotme@gmail.com" <bagasdotme@gmail.com>,
"eranian@google.com" <eranian@google.com>,
"christophe.leroy@csgroup.eu" <christophe.leroy@csgroup.eu>,
"jarkko@kernel.org" <jarkko@kernel.org>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"quic_jiles@quicinc.com" <quic_jiles@quicinc.com>,
"peternewman@google.com" <peternewman@google.com>
Subject: Re: [PATCH v11 13/13] Documentation/x86: Update resctrl.rst for new features
Date: Wed, 11 Jan 2023 18:39:59 -0600 [thread overview]
Message-ID: <03b78a30-97e4-07d8-5a09-44eb26b75970@amd.com> (raw)
In-Reply-To: <812a0d4d-dfb9-d351-9c9d-01d6943cd72b@intel.com>
Hi Reinette,
On 1/11/2023 4:56 PM, Reinette Chatre wrote:
> Hi Babu,
>
> On 1/11/2023 2:39 PM, Moger, Babu wrote:
>> [AMD Official Use Only - General]
>>
>> Hi Reinette,
>>
>>> -----Original Message-----
>>> From: Reinette Chatre <reinette.chatre@intel.com>
>>> Sent: Wednesday, January 11, 2023 4:07 PM
>>> To: Moger, Babu <Babu.Moger@amd.com>; corbet@lwn.net;
>>> tglx@linutronix.de; mingo@redhat.com; bp@alien8.de
>>> Cc: fenghua.yu@intel.com; dave.hansen@linux.intel.com; x86@kernel.org;
>>> hpa@zytor.com; paulmck@kernel.org; akpm@linux-foundation.org;
>>> quic_neeraju@quicinc.com; rdunlap@infradead.org;
>>> damien.lemoal@opensource.wdc.com; songmuchun@bytedance.com;
>>> peterz@infradead.org; jpoimboe@kernel.org; pbonzini@redhat.com;
>>> chang.seok.bae@intel.com; pawan.kumar.gupta@linux.intel.com;
>>> jmattson@google.com; daniel.sneddon@linux.intel.com; Das1, Sandipan
>>> <Sandipan.Das@amd.com>; tony.luck@intel.com; james.morse@arm.com;
>>> linux-doc@vger.kernel.org; linux-kernel@vger.kernel.org;
>>> bagasdotme@gmail.com; eranian@google.com; christophe.leroy@csgroup.eu;
>>> jarkko@kernel.org; adrian.hunter@intel.com; quic_jiles@quicinc.com;
>>> peternewman@google.com
>>> Subject: Re: [PATCH v11 13/13] Documentation/x86: Update resctrl.rst for new
>>> features
>>>
>>> Hi Babu,
>>>
>>> On 1/9/2023 8:44 AM, Babu Moger wrote:
>>>> Update the documentation for the new features:
>>>> 1. Slow Memory Bandwidth allocation (SMBA).
>>>> With this feature, the QOS enforcement policies can be applied
>>>> to the external slow memory connected to the host. QOS enforcement
>>>> is accomplished by assigning a Class Of Service (COS) to a processor
>>>> and specifying allocations or limits for that COS for each resource
>>>> to be allocated.
>>>>
>>>> 2. Bandwidth Monitoring Event Configuration (BMEC).
>>>> The bandwidth monitoring events mbm_total_bytes and mbm_local_bytes
>>>> are set to count all the total and local reads/writes respectively.
>>>> With the introduction of slow memory, the two counters are not
>>>> enough to count all the different types of memory events. With the
>>>> feature BMEC, the users have the option to configure mbm_total_bytes
>>>> and mbm_local_bytes to count the specific type of events.
>>>>
>>>> Also add configuration instructions with examples.
>>>>
>>>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>>>> ---
>>>> Documentation/x86/resctrl.rst | 142
>>>> +++++++++++++++++++++++++++++++++-
>>>> 1 file changed, 140 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/Documentation/x86/resctrl.rst
>>>> b/Documentation/x86/resctrl.rst index 71a531061e4e..2860856f4463
>>>> 100644
>>>> --- a/Documentation/x86/resctrl.rst
>>>> +++ b/Documentation/x86/resctrl.rst
>>>> @@ -17,14 +17,16 @@ AMD refers to this feature as AMD Platform Quality
>>> of Service(AMD QoS).
>>>> This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86
>>>> /proc/cpuinfo flag bits:
>>>>
>>>> -=============================================
>>> ================================
>>>> +===============================================
>>> ================================
>>>> RDT (Resource Director Technology) Allocation "rdt_a"
>>>> CAT (Cache Allocation Technology) "cat_l3", "cat_l2"
>>>> CDP (Code and Data Prioritization) "cdp_l3", "cdp_l2"
>>>> CQM (Cache QoS Monitoring) "cqm_llc",
>>> "cqm_occup_llc"
>>>> MBM (Memory Bandwidth Monitoring) "cqm_mbm_total",
>>> "cqm_mbm_local"
>>>> MBA (Memory Bandwidth Allocation) "mba"
>>>> -=============================================
>>> ================================
>>>> +SMBA (Slow Memory Bandwidth Allocation) "smba"
>>>> +BMEC (Bandwidth Monitoring Event Configuration) "bmec"
>>>> +===============================================
>>> ================================
>>> I expect that you will follow Boris's guidance here and not make these flags
>>> visible in /proc/cpuinfo. That would imply that this addition will have no entries
>>> in the second column. Perhaps this could be made easier to parse by using
>>> empty quotes ("") in the second column to match syntax used in the existing
>>> flags as well as the cpufeatures.h change?
>> Hmm.. I thought we dropped that idea for now. Did I miss understand that?
> I referred to the guidance in https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2FY7xjxUj%2BKnOEJssZ%40zn.tnic%2F&data=05%7C01%7CBabu.Moger%40amd.com%7C900eb41c0e6049dd342208daf4270d2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638090745842366944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2F5GVOhnxq1%2B3nJwGtlApvLfC%2FeX3X9RDaUZa9R92NiY%3D&reserved=0
> Since the SMBA and BMEC features have never appeared in /proc/cpuinfo there cannot
> be a user space that expects these flags in /proc/cpuinfo and thus no risk of
> breaking user space. User space can get information about SMBA and BMEC
> from the info directory.
ok. Got it.
>
> Later that thread discussed removal of existing resctrl feature flags from
> /proc/cpuinfo - that is what I think we shouldn't do since there are
> user space consumers of those flags. I thus agree that the task described in
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2FMW3PR12MB455384130AF0BDE3AF88BCF095FE9%40MW3PR12MB4553.namprd12.prod.outlook.com%2F&data=05%7C01%7CBabu.Moger%40amd.com%7C900eb41c0e6049dd342208daf4270d2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638090745842366944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=kE7d0cFYyJq1n4ZKKeeF%2FC%2FFDDJy0Sc%2Fd5MZ%2Bc56WQw%3D&reserved=0
> can be dropped.
Sure.
> I do not think this is a big change ... just add the empty quotes to the
> two cpufeatures.h patches and a new snippet to the resctrl documentation.
How about this? I want to get this right.. Hopefully next version can be
final.
diff --git a/Documentation/x86/resctrl.rst b/Documentation/x86/resctrl.rst
index 2860856f4463..7df5889237f4 100644
--- a/Documentation/x86/resctrl.rst
+++ b/Documentation/x86/resctrl.rst
@@ -24,10 +24,15 @@ CDP (Code and Data Prioritization) "cdp_l3", "cdp_l2"
CQM (Cache QoS Monitoring) "cqm_llc", "cqm_occup_llc"
MBM (Memory Bandwidth Monitoring) "cqm_mbm_total",
"cqm_mbm_local"
MBA (Memory Bandwidth Allocation) "mba"
-SMBA (Slow Memory Bandwidth Allocation) "smba"
-BMEC (Bandwidth Monitoring Event Configuration) "bmec"
+SMBA (Slow Memory Bandwidth Allocation) ""
+BMEC (Bandwidth Monitoring Event Configuration) ""
===============================================
================================
+Historically, new features were made visible by default in
/proc/cpuinfo. This
+resulted in the feature flags becoming hard to parse by the humans.
Adding a new
+flag to /proc/cpuinfo should be avoided if user space can obtain
information
+about the feature from resctrl's info directory.
+
To use the feature mount the file system::
# mount -t resctrl resctrl [-o cdp[,cdpl2][,mba_MBps]] /sys/fs/resctrl
thanks
Babu
next prev parent reply other threads:[~2023-01-12 0:41 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 16:43 [PATCH v11 00/13] x86/resctrl: Support for AMD QoS " Babu Moger
2023-01-09 16:43 ` [PATCH v11 01/13] x86/resctrl: Replace smp_call_function_many() with on_each_cpu_mask() Babu Moger
2023-01-09 23:26 ` Ashok Raj
2023-01-10 2:23 ` Moger, Babu
2023-01-10 20:58 ` Luck, Tony
2023-01-11 15:42 ` Ashok Raj
2023-01-11 19:05 ` Luck, Tony
2023-01-11 23:21 ` Ashok Raj
2023-01-09 16:43 ` [PATCH v11 02/13] x86/cpufeatures: Add Slow Memory Bandwidth Allocation feature flag Babu Moger
2023-01-09 16:43 ` [PATCH v11 03/13] x86/resctrl: Add a new resource type RDT_RESOURCE_SMBA Babu Moger
2023-01-09 16:43 ` [PATCH v11 04/13] x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag Babu Moger
2023-01-09 18:58 ` Borislav Petkov
2023-01-09 19:49 ` Moger, Babu
2023-01-09 21:07 ` Borislav Petkov
2023-01-09 21:25 ` Luck, Tony
2023-01-09 21:39 ` Borislav Petkov
2023-01-09 21:50 ` Luck, Tony
2023-01-24 11:28 ` Borislav Petkov
2023-01-09 23:43 ` Reinette Chatre
2023-01-24 11:32 ` Borislav Petkov
2023-01-09 21:44 ` Moger, Babu
2023-01-09 21:51 ` Borislav Petkov
2023-01-09 23:10 ` Moger, Babu
2023-01-24 11:34 ` Borislav Petkov
2023-01-24 14:11 ` Moger, Babu
2023-01-24 15:10 ` Borislav Petkov
2023-01-24 16:06 ` Moger, Babu
2023-01-24 16:59 ` Reinette Chatre
2023-01-24 17:30 ` Moger, Babu
2023-01-24 17:47 ` Reinette Chatre
2023-01-24 19:03 ` Moger, Babu
2023-01-24 19:11 ` Borislav Petkov
2023-01-24 19:23 ` Reinette Chatre
2023-01-24 20:12 ` Moger, Babu
2023-01-09 16:43 ` [PATCH v11 05/13] x86/resctrl: Include new features in command line options Babu Moger
2023-01-09 16:43 ` [PATCH v11 06/13] x86/resctrl: Detect and configure Slow Memory Bandwidth Allocation Babu Moger
2023-01-09 16:43 ` [PATCH v11 07/13] x86/resctrl: Add __init attribute to rdt_get_mon_l3_config() Babu Moger
2023-01-09 16:44 ` [PATCH v11 08/13] x86/resctrl: Support monitor configuration Babu Moger
2023-01-09 16:44 ` [PATCH v11 09/13] x86/resctrl: Add interface to read mbm_total_bytes_config Babu Moger
2023-01-09 16:44 ` [PATCH v11 10/13] x86/resctrl: Add interface to read mbm_local_bytes_config Babu Moger
2023-01-09 16:44 ` [PATCH v11 11/13] x86/resctrl: Add interface to write mbm_total_bytes_config Babu Moger
2023-01-11 22:04 ` Reinette Chatre
2023-01-09 16:44 ` [PATCH v11 12/13] x86/resctrl: Add interface to write mbm_local_bytes_config Babu Moger
2023-01-09 16:44 ` [PATCH v11 13/13] Documentation/x86: Update resctrl.rst for new features Babu Moger
2023-01-11 22:06 ` Reinette Chatre
2023-01-11 22:39 ` Moger, Babu
2023-01-11 22:56 ` Reinette Chatre
2023-01-12 0:39 ` Moger, Babu [this message]
2023-01-12 0:47 ` Moger, Babu
2023-01-12 17:30 ` Reinette Chatre
2023-01-12 19:06 ` Moger, Babu
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=03b78a30-97e4-07d8-5a09-44eb26b75970@amd.com \
--to=bmoger@amd.com \
--cc=Babu.Moger@amd.com \
--cc=Sandipan.Das@amd.com \
--cc=adrian.hunter@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bagasdotme@gmail.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=corbet@lwn.net \
--cc=damien.lemoal@opensource.wdc.com \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=jarkko@kernel.org \
--cc=jmattson@google.com \
--cc=jpoimboe@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=peternewman@google.com \
--cc=peterz@infradead.org \
--cc=quic_jiles@quicinc.com \
--cc=quic_neeraju@quicinc.com \
--cc=rdunlap@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=songmuchun@bytedance.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--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
all inboxes | Powered by JetHome®