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: <e860ff50-905e-4046-9024-a26348ff49f1@linux.ibm.com>
Date: Tue, 27 May 2025 23:05:33 +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,
        jstultz@...gle.com, kprateek.nayak@....com, huschle@...ux.ibm.com,
        srikar@...ux.ibm.com, linux-kernel@...r.kernel.org,
        linux@...musvillemoes.dk
Subject: Re: [RFC PATCH 2/5] sched/core: Don't use parked cpu for selection



On 5/27/25 20:29, Yury Norov wrote:
> On Fri, May 23, 2025 at 11:44:45PM +0530, Shrikanth Hegde wrote:
>> When the current running task is pushed using stop class mechanism, the
>> new CPU that going to be chosen shouldn't be a parked CPU.
>>
>> Signed-off-by: Shrikanth Hegde <sshegde@...ux.ibm.com>
>> ---
>>   kernel/sched/core.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>> index 62b3416f5e43..9ec12f9b3b08 100644
>> --- a/kernel/sched/core.c
>> +++ b/kernel/sched/core.c
>> @@ -3526,7 +3526,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
>>   		nodemask = cpumask_of_node(nid);
>>   
>>   		/* Look for allowed, online CPU in same node. */
>> -		for_each_cpu(dest_cpu, nodemask) {
>> +		for_each_cpu_andnot(dest_cpu, nodemask, cpu_parked_mask) {
>>   			if (is_cpu_allowed(p, dest_cpu))
>>   				return dest_cpu;
>>   		}
>> @@ -3534,7 +3534,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
>>   
>>   	for (;;) {
>>   		/* Any allowed, online CPU? */
>> -		for_each_cpu(dest_cpu, p->cpus_ptr) {
>> +		for_each_cpu_andnot(dest_cpu, p->cpus_ptr, cpu_parked_mask) {
>>   			if (!is_cpu_allowed(p, dest_cpu))
>>   				continue;
> 
> You test for online and dying CPUs in the is_cpu_allowed(). Why this
> new 'parked' creature is different?

Agreed. Let me try move that logic into is_cpu_allowed.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ