lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cdfeb701-3eee-167e-1132-d14bacd845f1@amd.com>
Date:   Tue, 5 Sep 2023 11:51:28 -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 v8 8/8] x86/resctrl: Display hardware ids of resource
 groups

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ