Re: [PATCH v8 8/8] x86/resctrl: Display hardware ids of resource groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Reinette,

On 9/1/23 12:57, Reinette Chatre wrote:
> Hi Babu,
> 
> On 9/1/2023 10:28 AM, Moger, Babu wrote:
>> On 8/31/23 19:43, Reinette Chatre wrote:
>>> On 8/31/2023 4:58 PM, Moger, Babu wrote:
>>>> @@ -3336,6 +3340,9 @@ static int mkdir_rdt_prepare(struct kernfs_node
>>>> *parent_kn,
>>>>         else
>>>>                 files = RFTYPE_BASE | RFTYPE_MON;
>>>>
>>>> +       if (rdt_mon_capable)
>>>> +               files |= RFTYPE_MON;
>>>> +
>>>
>>> Is this not redundant considering what just happened a few lines above?
>>
>> Yea. Right. I will change the previous line to
>>
>> files = RFTYPE_BASE;
>>
> 
> This is not clear to me. If I understand correctly this means that
> when rtype == RDTMON_GROUP then files = RFTYPE_BASE?
> This does not sound right to me. I think it would be awkward to to set
> files = RFTYPE_BASE if rtype == RDTMON_GROUP and then later do another
> test using rdt_mon_capable to set the correct flag. It should be possible
> to integrate this better.
> 
> What is needed is:
> When group is a control group:
> 	files = RFTYPE_BASE | RFTYPE_CTRL;
> When group is a monitor group:
> 	files = RFTYPE_BASE | RFTYPE_MON;
> When group is a monitor and control group then:
> 	files = RFTYPE_BASE | RFTYPE_CTRL | RFTYPE_MON;
> 
> How about just moving the "if (rdt_mon_capable)" check into the 
> snippet that sets the flag for a control group?
> 
Sure. Will change it to.

   if (rtype == RDTCTRL_GROUP) {
                files = RFTYPE_BASE | RFTYPE_CTRL;
                if (rdt_mon_capable)
                        files |= RFTYPE_MON;
   } else {
                files = RFTYPE_BASE | RFTYPE_MON;
   }


thanks
Babu




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux