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] [day] [month] [year] [list]
Message-ID: <b1c835f3-a574-4201-8628-c5e813a0e19f@amd.com>
Date: Mon, 21 Apr 2025 14:24:26 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
CC: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot
	<vincent.guittot@...aro.org>, <linux-kernel@...r.kernel.org>, "Dietmar
 Eggemann" <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>, "Valentin
 Schneider" <vschneid@...hat.com>, "Gautham R. Shenoy"
	<gautham.shenoy@....com>, Swapnil Sapkal <swapnil.sapkal@....com>
Subject: Re: [RFC PATCH 3/5] sched/fair: Update overloaded mask in presence of
 pushable task

Hello Shrikanth,

On 4/21/2025 1:33 PM, Shrikanth Hegde wrote:
>>> I was getting below error when compiling. Noticed that overloaded_mask is a local update and it wouldn't
>>> update the actual overloaded_mask.
>>
>> Interesting! Question: Do you have "CONFIG_CPUMASK_OFFSTACK" enabled in
>> your config? (me makes a note to test this too in the next iteration)
>> Looking at the arch specific Kconfigs, there is a slight difference in
>> how this is toggled on x86 vs powerpc and I'm wondering if that is why
>> I haven't seen this warning in my testing.
>>
> 
> Yes, that's the reason you didn't run into.
> for me, CONFIG_CPUMASK_OFFSTACK is not set.

Thank you for confirming!

> 
>>>
>>> Compilation Error:
>>> kernel/sched/fair.c: In function ‘update_overloaded_mask’:
>>> kernel/sched/fair.c:8570:25: error: assignment to expression with array type
>>>   8570 |         overloaded_mask = sd_share->overloaded_mask;
>>>        |                         ^
>>> kernel/sched/fair.c:8571:13: warning: the address of ‘overloaded_mask’ will always evaluate as ‘true’ [-Waddress]
>>>   8571 |         if (!overloaded_mask)
>>>
>>>
>>>
>>> Made the below change. Also you would need rcu protection for sd_share i think.
> 
> Or you need to use like below. This also works (Not tested on x86)
> 
> struct cpumask*  overloaded_mask;

Ack! Perhaps that is the way to go. I'll take some inspiration from
other cpumask usage in kernel and adjust this accordingly. Thanks a ton
for testing.

> 
>>
>> You are right! Thank you for the pointers and spotting my oversight.
>> Aaron too pointed some shortcomings here. I'll make sure to test
>> these bits more next time (LOCKDEP, hotplug, and
>> !CONFIG_CPUMASK_OFFSTACK)

-- 
Thanks and Regards,
Prateek


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ