[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b30803f3-e681-d11c-ad84-ce9677765609@intel.com>
Date: Wed, 22 Mar 2023 11:46:08 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: <babu.moger@....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 v3 4/7] x86/resctrl: Re-arrange RFTYPE flags based on
hierarchy
Hi Babu,
On 3/21/2023 8:54 AM, Moger, Babu wrote:
> Hi Reinette,
> To be honest, I had tough time understanding these flags. Also, I need to
> add more files in the future. So, I am trying make these these things
> clear before I do those changes.
>
> These flags decoding is pretty confusing. Also, there are some flags which
> are duplicate. Not really required.
>
> For example:
> In group structure, we have control group or mon group. We just need two
> bits here. The code uses combination of 3 flags here.
> #define RFTYPE_BASE BIT(1)
> #define RFTYPE_CTRL BIT(4)
> #define RFTYPE_MON BIT(5)
Two bits are used to distinguish between files being for control or
monitoring groups respectively.
The third bit you list is used to indicate where the file is located. The
RFTYPE_BASE is the bit used to specify that the file is located within
a resource group, as opposed to RFTYPE_INFO that specifies that the file
is located within the info directory.
> Also, the flag RFTYPE_MON again used in creation on info directory.
> Basically, very confusing to add anything new.
The RFTYPE_MON indicates a monitoring file. Whether it is in the info
directory or as part of a monitoring group is specified using RFTYPE_INFO
or RFTYPE_BASE respectively.
A file can be specific to a monitoring or control group by setting
the RFTYPE_CTRL or RFTYPE_MON bits, but if it does not then control and
monitoring groups will have the file. For example, the "tasks" and "cpus"
files.
> I will try to minimize the changes in the next version but still make it
> clear.
ok
>
>
> On 3/15/23 13:37, Reinette Chatre wrote:
>> Hi Babu,
>>
>> On 3/2/2023 12:24 PM, Babu Moger wrote:
>>> RESCTRL filesystem has two main components:
>>> a. info (Details on resources and monitoring)
>>> b. base (Details on CONTROL and MON groups)
>>>
>>> The rftype flags can be renamed accordingly for better understanding.
>>> For example:
>>> RFTYPE_INFO : Files with these flags go in info directory
>>
>> This is not a rename but the current name.
>
> Agree. I am giving some example here. I may not need to change the text here.
>>
>>> RFTYPE_INFO_MON : Files with these flags go in info/L3_MON
>>
>> How does this improve the current RFTYPE_MON_INFO?
>
> RFTYPE_INFO_MON -> info/L3_MON.
>
> I tried to improve some readability based on hierarchy. Basically, looking
> at the flags we know exaclty where these files land.
It is not clear to me how switching around terms in the flag
accomplishes this. The meaning ends up the same.
>>> @@ -3218,7 +3218,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
>>> if (rtype == RDTCTRL_GROUP)
>>> fflags = RFTYPE_BASE | RFTYPE_CTRL;
>>> else
>>> - fflags = RFTYPE_BASE | RFTYPE_MON;
>>> + fflags = RFTYPE_BASE;
>>>
>>
>> Is this intended?
>
> Yes. We don't need this extra flag (RFTYPE_MON) here.
It is not used, but it reflects the resctrl design in support
of adding monitoring files. Future additions of files need not think
how such integration needs to happen since it has been solved and
is supported.
Reinette
Powered by blists - more mailing lists