[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89e77440-f5da-b594-f755-d491c6c81230@amd.com>
Date: Fri, 14 Jul 2023 11:44:51 -0500
From: "Moger, Babu" <babu.moger@....com>
To: Reinette Chatre <reinette.chatre@...el.com>, corbet@....net,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de
Cc: fenghua.yu@...el.com, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, paulmck@...nel.org, akpm@...ux-foundation.org,
quic_neeraju@...cinc.com, rdunlap@...radead.org,
damien.lemoal@...nsource.wdc.com, songmuchun@...edance.com,
peterz@...radead.org, jpoimboe@...nel.org, pbonzini@...hat.com,
chang.seok.bae@...el.com, pawan.kumar.gupta@...ux.intel.com,
jmattson@...gle.com, daniel.sneddon@...ux.intel.com,
sandipan.das@....com, tony.luck@...el.com, james.morse@....com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
bagasdotme@...il.com, eranian@...gle.com,
christophe.leroy@...roup.eu, jarkko@...nel.org,
adrian.hunter@...el.com, quic_jiles@...cinc.com,
peternewman@...gle.com
Subject: Re: [PATCH v5 8/8] x86/resctrl: Introduce RFTYPE_DEBUG flag
Hi Reinette,
On 7/7/23 16:47, Reinette Chatre wrote:
> Hi Babu,
>
> On 6/1/2023 12:02 PM, Babu Moger wrote:
>> Introduce RFTYPE_DEBUG flag which can be used to add files when
>> resctrl is mounted with "-o debug" option. RFTYPE_DEBUG is OR'd
>> with other RFTYPE_ flags. These other flags decide where in resctrl
>> structure these files should be created.
>>
>> Signed-off-by: Babu Moger <babu.moger@....com>
>> ---
>> arch/x86/kernel/cpu/resctrl/internal.h | 1 +
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 5 +++++
>> 2 files changed, 6 insertions(+)
>>
>> diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
>> index c07c6517d856..5bc8d371fc3e 100644
>> --- a/arch/x86/kernel/cpu/resctrl/internal.h
>> +++ b/arch/x86/kernel/cpu/resctrl/internal.h
>> @@ -294,6 +294,7 @@ struct rdtgroup {
>> #define RFTYPE_TOP BIT(6)
>> #define RFTYPE_RES_CACHE BIT(8)
>> #define RFTYPE_RES_MB BIT(9)
>> +#define RFTYPE_DEBUG BIT(10)
>> #define RFTYPE_CTRL_INFO (RFTYPE_INFO | RFTYPE_CTRL)
>> #define RFTYPE_MON_INFO (RFTYPE_INFO | RFTYPE_MON)
>> #define RFTYPE_TOP_INFO (RFTYPE_INFO | RFTYPE_TOP)
>> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> index e03cb01c4742..9e42ecbb9063 100644
>> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> @@ -1862,6 +1862,7 @@ static struct rftype res_common_files[] = {
>> .mode = 0444,
>> .kf_ops = &rdtgroup_kf_single_ops,
>> .seq_show = rdtgroup_rmid_show,
>> + .fflags = RFTYPE_BASE | RFTYPE_DEBUG,
>> },
>> {
>> .name = "schemata",
>> @@ -1891,6 +1892,7 @@ static struct rftype res_common_files[] = {
>> .mode = 0444,
>> .kf_ops = &rdtgroup_kf_single_ops,
>> .seq_show = rdtgroup_closid_show,
>> + .fflags = RFTYPE_CTRL_BASE | RFTYPE_DEBUG,
>> },
>>
>> };
>> @@ -1905,6 +1907,9 @@ static int rdtgroup_add_files(struct kernfs_node *kn, unsigned long fflags)
>>
>> lockdep_assert_held(&rdtgroup_mutex);
>>
>> + if (resctrl_debug)
>> + fflags |= RFTYPE_DEBUG;
>> +
>> for (rft = rfts; rft < rfts + len; rft++) {
>> if (rft->fflags && ((fflags & rft->fflags) == rft->fflags)) {
>> ret = rdtgroup_add_file(kn, rft);
>>
>>
>
> I think that the first and last hunk of this patch can be
> squashed with patch 5. From what I can tell it would help
> the motivation of patch 5 and fit nicely with what its
> changelog aims to describe. The remaining hunks can be
> moved to patch 6.
Sure.. Will do.
Thanks
Babu Moger
Powered by blists - more mailing lists