aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/resctrl.h
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2024-06-28 14:56:02 -0700
committerBorislav Petkov (AMD) <bp@alien8.de>2024-07-02 19:49:53 +0200
commitc103d4d48e1599a88001fa6215be27d55f3c025b (patch)
tree882e67f3031f55d28f75ef245c93e47b1aa224b3 /include/linux/resctrl.h
parentx86/resctrl: Prepare for new domain scope (diff)
downloadwireguard-linux-c103d4d48e1599a88001fa6215be27d55f3c025b.tar.xz
wireguard-linux-c103d4d48e1599a88001fa6215be27d55f3c025b.zip
x86/resctrl: Prepare to split rdt_domain structure
The rdt_domain structure is used for both control and monitor features. It is about to be split into separate structures for these two usages because the scope for control and monitoring features for a resource will be different for future resources. To allow for common code that scans a list of domains looking for a specific domain id, move all the common fields ("list", "id", "cpu_mask") into their own structure within the rdt_domain structure. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/r/20240628215619.76401-3-tony.luck@intel.com
Diffstat (limited to 'include/linux/resctrl.h')
-rw-r--r--include/linux/resctrl.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index ed693bfe474d..f63fcf17a3bc 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -59,10 +59,20 @@ struct resctrl_staged_config {
};
/**
- * struct rdt_domain - group of CPUs sharing a resctrl resource
+ * struct rdt_domain_hdr - common header for different domain types
* @list: all instances of this resource
* @id: unique id for this instance
* @cpu_mask: which CPUs share this resource
+ */
+struct rdt_domain_hdr {
+ struct list_head list;
+ int id;
+ struct cpumask cpu_mask;
+};
+
+/**
+ * struct rdt_domain - group of CPUs sharing a resctrl resource
+ * @hdr: common header for different domain types
* @rmid_busy_llc: bitmap of which limbo RMIDs are above threshold
* @mbm_total: saved state for MBM total bandwidth
* @mbm_local: saved state for MBM local bandwidth
@@ -77,9 +87,7 @@ struct resctrl_staged_config {
* by closid
*/
struct rdt_domain {
- struct list_head list;
- int id;
- struct cpumask cpu_mask;
+ struct rdt_domain_hdr hdr;
unsigned long *rmid_busy_llc;
struct mbm_state *mbm_total;
struct mbm_state *mbm_local;