Messages in this thread | | | Subject | Re: [PATCH v2 04/23] x86/resctrl: Merge mon_capable and mon_enabled | From | James Morse <> | Date | Fri, 22 Oct 2021 19:30:14 +0100 |
| |
Hi Babu,
On 20/10/2021 00:18, Babu Moger wrote: > On 10/1/21 11:02 AM, James Morse wrote: >> mon_enabled and mon_capable are always set as a pair by >> rdt_get_mon_l3_config(). >> >> There is no point having two values. >> >> Merge them together.
>> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h >> index 386ab3a41500..8180c539800d 100644 >> --- a/include/linux/resctrl.h >> +++ b/include/linux/resctrl.h >> @@ -130,7 +130,6 @@ struct resctrl_schema; >> /** >> * struct rdt_resource - attributes of a resctrl resource >> * @rid: The index of the resource >> - * @mon_enabled: Is monitoring enabled for this feature >> * @alloc_capable: Is allocation available on this machine >> * @mon_capable: Is monitor feature available on this machine >> * @num_rmid: Number of RMIDs available >> @@ -149,7 +148,6 @@ struct resctrl_schema; >> */ >> struct rdt_resource { >> int rid; >> - bool mon_enabled; >> bool alloc_capable; >> bool mon_capable; > > Also we should probably rename alloc_capable and mon_capable to > alloc_supported and mon_supported respectively. We dont have an option to > enable and disable these feature. If it is supported, it is always supported.
Does 'capable' imply the feature was enabled? I agree 'supported' is clearer now that the schema/resource enable step has been folded away.
I'll put this on the TODO list...
Thanks,
James
| |