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: <595d6062-fece-83c0-5d5d-2f9405f6b842@intel.com>
Date:   Tue, 26 Sep 2023 16:06:18 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     "Luck, Tony" <tony.luck@...el.com>
CC:     "Yu, Fenghua" <fenghua.yu@...el.com>,
        Peter Newman <peternewman@...gle.com>,
        Jonathan Corbet <corbet@....net>,
        Shuah Khan <skhan@...uxfoundation.org>,
        "x86@...nel.org" <x86@...nel.org>,
        Shaopeng Tan <tan.shaopeng@...itsu.com>,
        James Morse <james.morse@....com>,
        Jamie Iles <quic_jiles@...cinc.com>,
        Babu Moger <babu.moger@....com>,
        Randy Dunlap <rdunlap@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "patches@...ts.linux.dev" <patches@...ts.linux.dev>
Subject: Re: [PATCH v5 3/8] x86/resctrl: Split the rdt_domain structure

Hi Tony,

On 9/26/2023 3:14 PM, Luck, Tony wrote:
>>> But this seems like it is a lot of churn to avoid having separate
>>> functions to search control and monitor lists. Each a clone of
>>> the existing ~24 line rdt_find_domain() with just the type changed
>>> for the return value and the list travsersal.
>>
>> Yes. Sorry, I did not realize this implication during the earlier
>> discussions.
>>
>>>
>>> What do you think?
>>>
>>
>> It sounds to me as though you are advocating for open coding
>> rdt_find_ctrl_domain() and rdt_find_mon_domain()? That sounds good
>> to me.
> 
> Reinette,
> 
> While there is some churn, it maybe isn't all that bad.  I also ran the open
> coding case and having a pair of 24-line functions one after the other with
> just two trivial lines changed between them is unlikely to get past the x86
> maintainers without running this same conversation again.
> 

I expect you are right and your proposal makes the code cleaner.
Could the list_entry() call within rdt_find_domain() instead
extract a pointer to a struct rdt_domain_hdr? To me that would make
it most generic and avoid using wrong type for a pointer. I do think that
may have been what you intended by moving id in there though ...

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ