Re: [PATCH v11 14/23] x86/resctrl: Implement resctrl_arch_config_cntr() to assign a counter with ABMC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi James,


On 2/21/2025 12:06 PM, James Morse wrote:
Hi Babu,

On 22/01/2025 20:20, Babu Moger wrote:
The ABMC feature provides an option to the user to assign a hardware
counter to an RMID, event pair and monitor the bandwidth as long as it
is assigned. The assigned RMID will be tracked by the hardware until the
user unassigns it manually.

Implement an architecture-specific handler to assign and unassign the
counter. Configure counters by writing to the L3_QOS_ABMC_CFG MSR,
specifying the counter ID, bandwidth source (RMID), and event
configuration.

The feature details are documented in the APM listed below [1].
[1] AMD64 Architecture Programmer's Manual Volume 2: System Programming
     Publication # 24593 Revision 3.41 section 19.3.3.3 Assignable Bandwidth
     Monitoring (ABMC).

diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index acac7972cea4..161d3feb567c 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -724,4 +724,7 @@ unsigned int mon_event_config_index_get(u32 evtid);
  void resctrl_arch_mon_event_config_set(void *info);
  u32 resctrl_arch_mon_event_config_get(struct rdt_mon_domain *d,
  				      enum resctrl_event_id eventid);
+int resctrl_arch_config_cntr(struct rdt_resource *r, struct rdt_mon_domain *d,
+			     enum resctrl_event_id evtid, u32 rmid, u32 closid,
+			     u32 cntr_id, bool assign);
  #endif /* _ASM_X86_RESCTRL_INTERNAL_H */


Could this be added to include/linux/resctrl.h instead? Its where it needs to end up
eventually.


As Reinette already mentioned in [1], Boris wanted this moved when arch/fs code separation integrated. Lets keep it in resctrl/internal.h for now.

[1] https://lore.kernel.org/lkml/e524c376-9ef8-488e-8053-b49ccafd306d@xxxxxxxxx/

Thanks
Babu

Thanks,

James






[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux