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: <428622f8-8dd9-40c8-8762-6bdef6d3a785@intel.com>
Date: Mon, 4 Mar 2024 17:31:37 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: "Luck, Tony" <tony.luck@...el.com>, "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>
CC: 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>, Drew Fustini
	<dfustini@...libre.com>, "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 v4 1/2] x86/resctrl: Pass domain to target CPU

Hi Tony,

On 3/4/2024 4:17 PM, Luck, Tony wrote:
>>> +                   cpu = cpumask_any(&d->cpu_mask);
>>>
>>
>> cpu only needs to be assigned once. How about initializing cpu to
>> nr_cpu_ids at the same time msr_param.res and msr_param.dom is
>> initialized and only assign it when msr_param.res is assigned?
>> I think that will be more robust.
>>
>> If you agree and do this then please feel free to add:
>> Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
> 
> Reinette,
> 
> I agree. I'll move the assignment to "cpu" outside the CDP_NUM_TYPES
> loop.
> 

If I understand correctly that would always look for a valid "cpu"
even when none is needed. Not quite what I proposed but should
work. Just some wasted cycles in a non critical path. 

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ