Hi Tony, On 10/31/2023 2:17 PM, Tony Luck wrote: > The same rdt_domain structure is used for both control and monitor > functions. But this results in wasted memory as some of the fields are > only used by control functions, while most are only used for monitor > functions. > > Split into separate rdt_ctrl_domain and rdt_mon_domain structures with > just the fields required for control and monitoring respectively. > > Similar split of the rdt_hw_domain structure into rdt_hw_ctrl_domain > and rdt_hw_mon_domain. > > Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx> > --- > Changes since v9 > Comment against patch 4, but now fixed in patch #2. cpu_mask > is included in common header. > > include/linux/resctrl.h | 50 +++++++------ > arch/x86/kernel/cpu/resctrl/internal.h | 60 ++++++++++------ > arch/x86/kernel/cpu/resctrl/core.c | 87 ++++++++++++----------- > arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 32 ++++----- > arch/x86/kernel/cpu/resctrl/monitor.c | 40 +++++------ > arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 6 +- > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 62 ++++++++-------- > 7 files changed, 184 insertions(+), 153 deletions(-) > > diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > index 35e700edc6e6..36503e8870cd 100644 > --- a/include/linux/resctrl.h > +++ b/include/linux/resctrl.h > @@ -72,7 +72,25 @@ struct rdt_domain_hdr { > }; > > /** > - * struct rdt_domain - group of CPUs sharing a resctrl resource > + * struct rdt_ctrl_domain - group of CPUs sharing a resctrl control resource > + * @hdr: common header for different domain types > + * @cpu_mask: which CPUs share this resource > + * @plr: pseudo-locked region (if any) associated with domain > + * @staged_config: parsed configuration to be applied > + * @mbps_val: When mba_sc is enabled, this holds the array of user > + * specified control values for mba_sc in MBps, indexed > + * by closid > + */ > +struct rdt_ctrl_domain { > + struct rdt_domain_hdr hdr; > + struct cpumask cpu_mask; This patch did not change what it said it changed. Reinette