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: <30a82975-a6a0-435e-8574-b570386cd6f0@amd.com>
Date: Mon, 14 Apr 2025 08:43:05 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Aaron Lu <ziqianlu@...edance.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 Aaron,

On 4/14/2025 7:58 AM, Aaron Lu wrote:
> Hi Prateek,
> 
> On Wed, Apr 09, 2025 at 11:15:37AM +0000, K Prateek Nayak wrote:
>> In presence of pushable tasks on the CPU, set it on the newly introduced
>> "overloaded+mask" in sched_domain_shared struct. This will be used by
>> the newidle balance to limit the scanning to these overloaded CPUs since
>> they contain tasks that could be run on the newly idle target.
>>
>> Signed-off-by: K Prateek Nayak <kprateek.nayak@....com>
>> ---
>>   kernel/sched/fair.c | 24 ++++++++++++++++++++++++
>>   1 file changed, 24 insertions(+)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 98d3ed2078cd..834fcdd15cac 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -8559,6 +8559,24 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
>>   	return target;
>>   }
>>   
>> +static inline void update_overloaded_mask(int cpu, bool contains_pushable)
>> +{
>> +	struct sched_domain_shared *sd_share = rcu_dereference(per_cpu(sd_llc_shared, cpu));
> 
> I got a suspicious RCU usage warning for this line while testing your
> series. Since rq lock is held here, rcu_dereference() should not be
> necessary.

Thank you for reporting this. I'll make sure to run with LOCKDEP next
time around. Note: The performance aspect is still quite bad with this
series an the intent for the RFC was to vet the idea and to understand
if I got the basic implementation details right.

> 
>> +	cpumask_var_t overloaded_mask;
>> +
>> +	if (!sd_share)
>> +		return;
>> +
>> +	overloaded_mask = sd_share->overloaded_mask;
>> +	if (!overloaded_mask)
>> +		return;
>> +
>> +	if (contains_pushable)
>> +		cpumask_set_cpu(cpu, overloaded_mask);
>> +	else
>> +		cpumask_clear_cpu(cpu, overloaded_mask);
>> +}

-- 
Thanks and Regards,
Prateek


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ