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: <d14c71f4-512c-49f1-a27f-4cd872c14fe6@amd.com>
Date: Tue, 23 Sep 2025 07:21:24 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Fernand Sieber <sieberf@...zon.com>, <mingo@...hat.com>,
	<peterz@...radead.org>
CC: <linux-kernel@...r.kernel.org>, <juri.lelli@...hat.com>,
	<vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
	<rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
	<bristot@...hat.com>, <vschneid@...hat.com>, <dwmw@...zon.co.uk>,
	<jschoenh@...zon.de>, <liuyuxua@...zon.com>
Subject: Re: [PATCH 2/4] sched/fair: Still look for the idlest cpu with no
 matching cookie

Hello Fernand,

On 9/22/2025 6:09 PM, Fernand Sieber wrote:
> @@ -7391,6 +7393,17 @@ sched_balance_find_dst_group_cpu(struct sched_group *group, struct task_struct *
>  	return shallowest_idle_cpu != -1 ? shallowest_idle_cpu : least_loaded_cpu;

Based on the above return in __sched_balance_find_dst_group_cpu(), it
should always return a valid CPU since "least_loaded_cpu" is initialized
to "this_cpu".

>  }
>  
> +/*
> + * sched_balance_find_dst_group_cpu - find the idlest CPU among the CPUs in the group.
> + */
> +static inline int
> +sched_balance_find_dst_group_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
> +{
> +	int cpu = __sched_balance_find_dst_group_cpu(group, p, this_cpu, true);
> +
> +	return cpu >= 0 ? cpu : __sched_balance_find_dst_group_cpu(group, p, this_cpu, false);

So, under what circumstance does "cpu" here turns out to be < 0?
Am I missing something?

> +}
> +
>  static inline int sched_balance_find_dst_cpu(struct sched_domain *sd, struct task_struct *p,
>  				  int cpu, int prev_cpu, int sd_flag)
>  {

-- 
Thanks and Regards,
Prateek


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ