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: <6a5c2a91-dd0e-4916-b5b4-ed78841752a3@linux.ibm.com>
Date: Thu, 26 Jun 2025 19:12:53 +0530
From: Shrikanth Hegde <sshegde@...ux.ibm.com>
To: Yury Norov <yury.norov@...il.com>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, tglx@...utronix.de, maddy@...ux.ibm.com,
        vschneid@...hat.com, dietmar.eggemann@....com, rostedt@...dmis.org,
        kprateek.nayak@....com, huschle@...ux.ibm.com, srikar@...ux.ibm.com,
        linux-kernel@...r.kernel.org, christophe.leroy@...roup.eu,
        linuxppc-dev@...ts.ozlabs.org, gregkh@...uxfoundation.org
Subject: Re: [RFC v2 4/9] sched/fair: Don't use CPU marked as avoid for wakeup
 and load balance



On 6/26/25 05:32, Yury Norov wrote:
> On Thu, Jun 26, 2025 at 12:41:03AM +0530, Shrikanth Hegde wrote:
>> Load balancer shouldn't spread CFS tasks into a CPU marked as Avoid.
>> Remove those CPUs from load balancing decisions.
>>
>> At wakeup, don't select a CPU marked as avoid.
>>
>> Signed-off-by: Shrikanth Hegde <sshegde@...ux.ibm.com>
>> ---
>> while tesing didn't see cpu being marked as avoid while new_cpu is.
>> May need some more probing to see if even cpu can be. if so it could
>> lead to crash.
>>
>>   kernel/sched/fair.c | 10 +++++++++-
>>   1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 7e2963efe800..406288aef535 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -8546,7 +8546,12 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
>>   	}
>>   	rcu_read_unlock();
>>   
>> -	return new_cpu;
>> +	/* Don't select a CPU marked as avoid for wakeup */
>> +	if (cpu_avoid(new_cpu))
>> +		return cpu;
>> +	else
>> +		return new_cpu;
>> +
>>   }
> 
> There are more 'return's in this function, but you patch only one... 

I had seen it but forgot to add. (since eas wasn't enabled in the system 
so i forgot)

> 
>>   
>>   /*
>> @@ -11662,6 +11667,9 @@ static int sched_balance_rq(int this_cpu, struct rq *this_rq,
>>   
>>   	cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
>>   
>> +	/* Don't spread load into CPUs marked as avoid */
>> +	cpumask_andnot(cpus, cpus, cpu_avoid_mask);
>> +
>>   	schedstat_inc(sd->lb_count[idle]);
>>   
>>   redo:
>> -- 
>> 2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ