Re: [PATCH v5 04/20] x86/resctrl: Detect Assignable Bandwidth Monitoring feature details

From: Reinette Chatre
Date: Tue Jul 16 2024 - 11:12:15 EST


Hi Babu,

On 7/15/24 1:04 PM, Moger, Babu wrote:
On 7/12/24 17:04, Reinette Chatre wrote:
On 7/3/24 2:48 PM, Babu Moger wrote:

diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index e43fc5bb5a3a..62f0f002ef41 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -185,10 +185,14 @@ enum resctrl_scope {
  /**
   * struct resctrl_mon - Monitoring related data
   * @num_rmid:        Number of RMIDs available
+ * @num_mbm_cntrs:    Number of monitoring counters
+ * @abmc_capable:    Is system capable of supporting monitor assignment?
   * @evt_list:        List of monitoring events
   */
  struct resctrl_mon {
      int            num_rmid;
+    int            num_mbm_cntrs;
+    bool            abmc_capable;
      struct list_head    evt_list;
  };

How about renaming "abmc_capable" to "mbm_cntr_capable? That would,
(a) connect the capability to the "num_mbm_cntrs" property, and (b)
remove the AMD marketing name from the resctrl filesystem code that
will be shared by all architectures.

"mbm_cntr_capable" does not give full meaning of the feature.

How about "mbm_cntr_assignable"?


"mbm_cntr_assignable" sounds good to me.

Thank you.

Reinette