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: <012601d01056$1965d3c0$4c317b40$@alibaba-inc.com>
Date:	Fri, 05 Dec 2014 14:38:36 +0800
From:	"Hillf Danton" <hillf.zj@...baba-inc.com>
To:	<jun.zhang@...el.com>, <mingo@...hat.com>, <peterz@...radead.org>
Cc:	<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>,
	"'Chuansheng Liu'" <chuansheng.liu@...el.com>,
	"'Changcheng Liu'" <changcheng.liu@...el.com>,
	"'Vincent Guittot'" <vincent.guittot@...aro.org>,
	<pang.xunlei@....com.cn>
Subject: Re: [PATCH] sched/fair: fix find_idlest_cpu return -1

Cc: pang.xunlei@....com.cn
> 
> From: zhang jun <jun.zhang@...el.com>
> 
> find_idlest_cpu return -1 is not reasonable, set default value to this_cpu.
> 
> Signed-off-by: zhang jun <jun.zhang@...el.com>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@...el.com>
> Signed-off-by: Changcheng Liu <changcheng.liu@...el.com>
> Cc: Hillf Danton <hillf.zj@...baba-inc.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: <stable@...r.kernel.org> # 3.14.25
> ---
>  kernel/sched/fair.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 9b4c4f3..9d18887 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4151,7 +4151,7 @@ static int
>  find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
>  {
>  	unsigned long load, min_load = ULONG_MAX;
> -	int idlest = -1;
> +	int idlest = this_cpu;
>  	int i;
> 
>  	/* Traverse only the allowed CPUs */
> @@ -4284,7 +4284,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
>  		}
> 
>  		new_cpu = find_idlest_cpu(group, p, cpu);
> -		if (new_cpu == -1 || new_cpu == cpu) {
> +		if (new_cpu == cpu) {
>  			/* Now try balancing at a lower domain level of cpu */
>  			sd = sd->child;
>  			continue;
> --
> 1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ