From: "Moger, Babu" <bmoger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
babu.moger@amd.com, corbet@lwn.net, fenghua.yu@intel.com,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, James Morse <james.morse@arm.com>
Cc: x86@kernel.org, hpa@zytor.com, paulmck@kernel.org,
rdunlap@infradead.org, tj@kernel.org, peterz@infradead.org,
seanjc@google.com, kim.phillips@amd.com, jmattson@google.com,
ilpo.jarvinen@linux.intel.com, jithu.joseph@intel.com,
kan.liang@linux.intel.com, nikunj@amd.com,
daniel.sneddon@linux.intel.com, pbonzini@redhat.com,
rick.p.edgecombe@intel.com, rppt@kernel.org,
maciej.wieczor-retman@intel.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, eranian@google.com,
peternewman@google.com, dhagiani@amd.com
Subject: Re: [PATCH 00/15] x86/resctrl : Support AMD QoS RMID Pinning feature
Date: Thu, 7 Dec 2023 17:07:15 -0600 [thread overview]
Message-ID: <a6338e5d-ab94-8da8-3127-3ce90997bf65@amd.com> (raw)
In-Reply-To: <390bbb7b-e709-4290-9bef-eed373e469b2@intel.com>
Hi Reinette,
On 12/7/2023 1:29 PM, Reinette Chatre wrote:
> Hi Babu,
>
> On 12/7/2023 8:12 AM, Moger, Babu wrote:
>> On 12/6/23 12:49, Reinette Chatre wrote:
>>> On 12/6/2023 7:40 AM, Moger, Babu wrote:
>>>> On 12/5/23 17:17, Reinette Chatre wrote:
>>>>> On 11/30/2023 4:57 PM, Babu Moger wrote:
>
>>>>>> b. Mount with ABMC support
>>>>>> #umount /sys/fs/resctrl/
>>>>>> #mount -o abmc -t resctrl resctrl /sys/fs/resctrl/
>>>>>>
>>>>> hmmm ... so this requires the user to mount resctrl, determine if the
>>>>> feature is supported, unmount resctrl, remount resctrl with feature enabled.
>>>>> Could you please elaborate what prevents this feature from being enabled
>>>>> without needing to remount resctrl?
>>>> Spec says
>>>> "Enabling ABMC: ABMC is enabled by setting L3_QOS_EXT_CFG.ABMC_En=1 (see
>>>> Figure 19-7). When the state of ABMC_En is changed, it must be changed to
>>>> the updated value on all logical processors in the QOS Domain.
>>>> Upon transitions of the ABMC_En the following actions take place:
>>>> All ABMC assignable bandwidth counters are reset to 0.
>>>> The L3 default mode bandwidth counters are reset to 0.
>>>> The L3_QOS_ABMC_CFG MSR is reset to 0."
>>>>
>>>> So, all the monitoring group counters will be reset.
>>>>
>>>> It is technically possible to enable without remount. But ABMC mode
>>>> requires few new files(in each group) which I added when mounted with "-o
>>>> abmc". Thought it is a better option.
>>>>
>>>> Otherwise we need to add these files when ABMC is supported(not when
>>>> enabled). Need to add another file in /sys/fs/resctrl/info/L3_MON to
>>>> enable the feature on the fly.
>>>>
>>>> Both are acceptable options. Any thoughts?
>>> The new resctrl files in info/ could always be present. For example,
>>> user space may want to know how many counters are available before
>>> enabling the feature.
>>>
>>> It is not yet obvious to me that this feature requires new files
>>> in monitor groups.
>> There are two MBM events(total and local) in each group.
>> We should provide an interface to assign each event independently.
>> User can assign only one event in a group. We should also provide an
>> option assign both the events in the group. This needs to be done at
>> resctrl group level.
> Understood. I would like to start by considering how (if at all) existing
> files may be used, thus my example of using mbm_total_bytes, before adding
> more files.
>
>
> ...
>
>>>>>> #cat /sys/fs/resctrl/mon_data/mon_L3_00/mbm_local_bytes
>>>>>> Unavailable
>>>>> I believe that "Unavailable" already has an accepted meaning within current
>>>>> interface and is associated with temporary failure. Even the AMD spec states "This
>>>>> is generally a temporary condition and subsequent reads may succeed". In the
>>>>> scenario above there is no chance that this counter would produce a value later.
>>>>> I do not think it is ideal to overload existing interface with different meanings
>>>>> associated with a new hardware specific feature ... something like "Disabled" seems
>>>>> more appropriate.
>>>> Hardware still reports it as unavailable. Also, there are some error cases
>>>> hardware can report unavailable. We may not be able to differentiate that.
>>> This highlights that this resctrl feature is currently latched to AMD's
>>> ABMC. I do not think we should require that this resctrl feature is backed
>>> by hardware that can support reads of counters that are disabled. A counter
>>> read really only needs to be sent to hardware if it is enabled.
>>>
>>>>> Considering this we may even consider using these files themselves as a
>>>>> way to enable the counters if they are disabled. For example, just
>>>>> "echo 1 > /sys/fs/resctrl/mon_data/mon_L3_00/mbm_total_bytes" can be used
>>>> I am not sure about this. This is specific to domain 0. This group can
>>>> have cpus from multiple domains. I think we should have the interface for
>>>> all the domains(not for specific domain).
>>> Are the ABMC registers not per CPU? This is unclear to me at this time
>>> since changelog of patch #13 states it is per-CPU but yet the code
>>> uses smp_call_function_any().
>> Here are the clarifications from hardware engineer about this.
>>
>> # While configuring the counter, should we have to write (L3_QOS_ABMC_CFG)
>> on all the logical processors in a domain?
>>
>> No. In order to configure a specific counter, you only need to write it
>> on a single logical processor in a domain. Configuring the actual ABMC
>> counter is a side-effect of the write to this register. And the actual
>> ABMC counter configuration is a global state.
>>
>> "Each logical processor implements a separate copy of these registers"
>> identifies that if you write a 5 to L3_QOS_ABMC_CFG on C0T0, you will not
>> read a 5 from the L3_QOS_ABMC_CFG register on C1T0.
> Thank you for this information. Would reading L3_QOS_ABMC_DSC register on
> C1T0 return the configuration written to L3_QOS_ABMC_CFG on C0T0 ?
Yes. Because the counter counter configuration is global. Reading
L3_QOS_ABMC_DSC will return the configuration of the counter specified by
QOS_ABMC_CFG[CtrID].
>
> Even so, you do confirm that the counter configuration is per domain. If I
> understand correctly the implementation in this series assumes the counters
> are programmed identically on all domains, but theoretically the system can support
> domains with different counter configurations. For example, if a resource group
> is limited to CPUs in one domain it would be unnecessary to consume the other
> domain's counters.
Yes. It is programmed on all the domains. Separating the domain
configuration will require more changes. I am not planning to address in
this series.
>
> This also ties into what this feature may morph into when considering the
> non-ABMC AMD hardware needing similar interface as well as MPAM. I understand
> for MPAM that resources are required for a counter but I do not know their
> scope.
>
> Reinette
next prev parent reply other threads:[~2023-12-07 23:07 UTC|newest]
Thread overview: 147+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 0:57 Babu Moger
2023-12-01 0:57 ` [PATCH 01/15] x86/resctrl: Remove hard-coded memory bandwidth limit Babu Moger
2023-12-05 23:18 ` Reinette Chatre
2023-12-06 16:29 ` Moger, Babu
2023-12-06 17:09 ` Reinette Chatre
2023-12-06 17:37 ` Moger, Babu
2023-12-01 0:57 ` [PATCH 02/15] x86/resctrl: Remove hard-coded memory bandwidth event configuration Babu Moger
2023-12-05 23:21 ` Reinette Chatre
2023-12-06 17:17 ` Moger, Babu
2023-12-06 18:32 ` Reinette Chatre
2023-12-06 19:17 ` Moger, Babu
2023-12-07 19:02 ` Reinette Chatre
2023-12-07 23:37 ` Moger, Babu
2023-12-01 0:57 ` [PATCH 03/15] x86/resctrl: Add support for Assignable Bandwidth Monitoring Counters (ABMC) Babu Moger
2023-12-01 0:57 ` [PATCH 04/15] x86/resctrl: Add ABMC feature in the command line options Babu Moger
2023-12-01 0:57 ` [PATCH 05/15] x86/resctrl: Detect ABMC feature details Babu Moger
2023-12-01 0:57 ` [PATCH 06/15] x86/resctrl: Add the mount option for ABMC feature Babu Moger
2023-12-01 0:57 ` [PATCH 07/15] x86/resctrl: Add support to enable/disable " Babu Moger
2023-12-05 16:48 ` kernel test robot
2023-12-05 17:40 ` Moger, Babu
2023-12-05 18:50 ` kernel test robot
2023-12-01 0:57 ` [PATCH 08/15] x86/resctrl: Introduce interface to display number of ABMC counters Babu Moger
2023-12-01 0:57 ` [PATCH 09/15] x86/resctrl: Add interface to display monitor state of the group Babu Moger
2023-12-01 0:57 ` [PATCH 10/15] x86/resctrl: Initialize ABMC counters bitmap Babu Moger
2023-12-01 0:57 ` [PATCH 11/15] x86/resctrl: Add data structures for ABMC assignment Babu Moger
2023-12-01 0:57 ` [PATCH 12/15] x86/resctrl: Introduce mbm_total_cfg and mbm_local_cfg Babu Moger
2023-12-01 0:57 ` [PATCH 13/15] x86/resctrl: Add the interface to assign a ABMC counter Babu Moger
2023-12-01 0:57 ` [PATCH 14/15] x86/resctrl: Add interface unassign " Babu Moger
2023-12-05 17:55 ` kernel test robot
2023-12-05 18:09 ` Moger, Babu
2023-12-01 0:57 ` [PATCH 15/15] x86/resctrl: Update ABMC assignment on event configuration changes Babu Moger
2023-12-05 0:13 ` [PATCH 00/15] x86/resctrl : Support AMD QoS RMID Pinning feature Peter Newman
2023-12-05 23:17 ` Reinette Chatre
2023-12-06 15:40 ` Moger, Babu
2023-12-06 18:49 ` Reinette Chatre
2023-12-07 16:12 ` Moger, Babu
2023-12-07 19:29 ` Reinette Chatre
2023-12-07 23:07 ` Moger, Babu [this message]
2023-12-07 23:26 ` Reinette Chatre
2023-12-07 23:34 ` Moger, Babu
2023-12-08 22:58 ` Moger, Babu
2023-12-08 19:45 ` Peter Newman
2023-12-08 20:09 ` Reinette Chatre
2023-12-12 18:02 ` [PATCH v2 1/2] x86/resctrl: Remove hard-coded memory bandwidth limit Babu Moger
2023-12-15 2:20 ` Reinette Chatre
2024-01-02 19:52 ` Moger, Babu
2023-12-12 18:02 ` [PATCH v2 2/2] x86/resctrl: Remove hard-coded memory bandwidth event configuration Babu Moger
2023-12-15 1:24 ` Reinette Chatre
2024-01-02 20:00 ` Moger, Babu
2024-01-03 18:38 ` Reinette Chatre
2024-01-03 21:03 ` Moger, Babu
2024-01-03 21:40 ` Reinette Chatre
2024-01-04 13:48 ` Moger, Babu
2024-01-04 21:21 ` [PATCH v3 1/2] x86/resctrl: Remove hard-coded memory bandwidth limit Babu Moger
2024-01-05 21:14 ` Reinette Chatre
2024-01-05 23:51 ` Moger, Babu
2024-01-04 21:21 ` [PATCH v3 2/2] x86/resctrl: Remove hard-coded memory bandwidth event configuration Babu Moger
2024-01-05 21:18 ` Reinette Chatre
2024-01-06 0:13 ` Moger, Babu
2024-01-11 21:36 ` [PATCH v4 1/2] x86/resctrl: Remove hard-coded memory bandwidth limit Babu Moger
2024-01-11 21:36 ` [PATCH v4 2/2] x86/resctrl: Read supported bandwidth sources using CPUID command Babu Moger
2024-01-12 19:02 ` Reinette Chatre
2024-01-12 20:38 ` Moger, Babu
2024-01-12 21:24 ` Reinette Chatre
2024-01-12 21:54 ` Moger, Babu
2024-01-15 22:52 ` [PATCH v5 1/2] x86/resctrl: Remove hard-coded memory bandwidth limit Babu Moger
2024-01-23 10:36 ` Borislav Petkov
2024-01-23 14:58 ` Moger, Babu
2024-01-23 15:36 ` [tip: x86/cache] " tip-bot2 for Babu Moger
2024-01-15 22:52 ` [PATCH v5 2/2] x86/resctrl: Read supported bandwidth sources using CPUID command Babu Moger
2024-01-16 19:44 ` Reinette Chatre
2024-01-16 21:39 ` Moger, Babu
2024-01-23 15:36 ` [tip: x86/cache] x86/resctrl: Read supported bandwidth sources from CPUID tip-bot2 for Babu Moger
2024-01-19 18:22 ` [PATCH v2 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) Babu Moger
2024-01-19 18:22 ` [PATCH v2 01/17] x86/cpufeatures: Add word 21 for scattered CPUID features Babu Moger
2024-01-19 18:22 ` [PATCH v2 02/17] x86/resctrl: Add support for Assignable Bandwidth Monitoring Counters (ABMC) Babu Moger
2024-01-19 18:22 ` [PATCH v2 03/17] x86/resctrl: Add ABMC feature in the command line options Babu Moger
2024-01-19 18:22 ` [PATCH v2 04/17] x86/resctrl: Detect Assignable Bandwidth Monitoring feature details Babu Moger
2024-02-20 17:56 ` James Morse
2024-02-20 21:27 ` Moger, Babu
2024-01-19 18:22 ` [PATCH v2 05/17] x86/resctrl: Introduce resctrl_file_fflags_init Babu Moger
2024-01-19 18:22 ` [PATCH v2 06/17] x86/resctrl: Introduce interface to display number of ABMC counters Babu Moger
2024-02-20 18:14 ` James Morse
2024-02-20 21:23 ` Moger, Babu
2024-01-19 18:22 ` [PATCH v2 07/17] x86/resctrl: Add support to enable/disable ABMC feature Babu Moger
2024-01-19 18:22 ` [PATCH v2 08/17] x86/resctrl: Introduce the interface to display ABMC state Babu Moger
2024-01-19 18:22 ` [PATCH v2 09/17] x86/resctrl: Introdruce rdtgroup_assign_enable_write Babu Moger
2024-01-19 18:22 ` [PATCH v2 10/17] x86/resctrl: Add interface to display monitor state of the group Babu Moger
2024-01-19 18:22 ` [PATCH v2 11/17] x86/resctrl: Report Unsupported when MBM events are read Babu Moger
2024-01-19 18:22 ` [PATCH v2 12/17] x86/resctrl: Initialize assignable counters bitmap Babu Moger
2024-01-19 18:22 ` [PATCH v2 13/17] x86/resctrl: Add data structures for ABMC assignment Babu Moger
2024-01-19 18:22 ` [PATCH v2 14/17] x86/resctrl: Introduce mbm_total_cfg and mbm_local_cfg Babu Moger
2024-01-19 18:22 ` [PATCH v2 15/17] x86/resctrl: Add the interface to assign the RMID Babu Moger
2024-01-19 18:22 ` [PATCH v2 16/17] x86/resctrl: Add the interface unassign " Babu Moger
2024-01-19 18:22 ` [PATCH v2 17/17] x86/resctrl: Update RMID assignments on event configuration changes Babu Moger
2024-01-19 18:32 ` [PATCH v2 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) Reinette Chatre
2024-01-19 20:35 ` Moger, Babu
2024-02-02 4:09 ` Reinette Chatre
2024-02-02 5:01 ` Reinette Chatre
2024-02-02 21:57 ` Moger, Babu
2024-02-05 22:38 ` Reinette Chatre
2024-02-08 17:29 ` Moger, Babu
2024-02-16 20:18 ` Peter Newman
2024-02-19 18:00 ` Moger, Babu
2024-02-20 15:21 ` James Morse
2024-02-20 18:11 ` Peter Newman
2024-02-23 21:47 ` Moger, Babu
2024-02-20 15:21 ` James Morse
2024-02-20 18:14 ` James Morse
2024-02-20 20:48 ` Moger, Babu
2024-02-23 17:17 ` Reinette Chatre
2024-02-23 20:11 ` Moger, Babu
2024-02-23 22:21 ` Reinette Chatre
2024-02-26 17:59 ` Moger, Babu
2024-02-26 21:20 ` Reinette Chatre
2024-02-27 18:12 ` Moger, Babu
2024-02-27 18:26 ` Peter Newman
2024-02-27 19:37 ` Moger, Babu
2024-02-27 20:06 ` Peter Newman
2024-02-27 20:42 ` Moger, Babu
2024-02-27 23:50 ` Reinette Chatre
2024-02-28 17:59 ` Moger, Babu
2024-02-28 20:04 ` Reinette Chatre
2024-02-29 20:37 ` Moger, Babu
2024-02-29 21:50 ` Reinette Chatre
2024-03-01 20:36 ` Moger, Babu
2024-03-01 23:20 ` Reinette Chatre
2024-03-04 19:34 ` Moger, Babu
2024-03-04 19:58 ` Reinette Chatre
2024-03-04 22:24 ` Moger, Babu
2024-03-05 14:58 ` Moger, Babu
2024-03-05 17:12 ` Reinette Chatre
2024-03-05 19:35 ` Moger, Babu
2024-03-07 18:57 ` Peter Newman
2024-03-07 20:41 ` Reinette Chatre
2024-03-07 22:33 ` Peter Newman
2024-03-07 22:53 ` Reinette Chatre
2024-03-07 23:14 ` Peter Newman
2024-03-08 17:13 ` Reinette Chatre
2024-03-08 3:50 ` Moger, Babu
2024-03-08 17:20 ` Reinette Chatre
2024-03-12 13:30 ` Moger, Babu
2024-03-11 15:40 ` Moger, Babu
2024-03-12 15:13 ` Reinette Chatre
2024-03-12 17:07 ` Moger, Babu
2024-03-12 17:15 ` Reinette Chatre
2024-03-12 17:24 ` 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=a6338e5d-ab94-8da8-3127-3ce90997bf65@amd.com \
--to=bmoger@amd.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dhagiani@amd.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=james.morse@arm.com \
--cc=jithu.joseph@intel.com \
--cc=jmattson@google.com \
--cc=kan.liang@linux.intel.com \
--cc=kim.phillips@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=paulmck@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peternewman@google.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=rick.p.edgecombe@intel.com \
--cc=rppt@kernel.org \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.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
Powered by JetHome