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]
Date:	Fri, 27 Mar 2015 16:58:23 +0530
From:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To:	Wanpeng Li <wanpeng.li@...ux.intel.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Jason Low <jason.low2@...com>,
	Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched/fair: fix update the nohz.next_balance even if
 we haven't done any load balance

* Wanpeng Li <wanpeng.li@...ux.intel.com> [2015-03-27 15:52:30]:

> As Srikar pointed out (https://lkml.org/lkml/2015/3/27/26):
> 
> | With the current code when the ilb cpus are not free:
> | - We would be updating the nohz.next_balance even through we havent done
> |   any load balance.
> | - We might iterate thro the nohz.idle_cpus_mask()s to find balance_cpus.
> 
> This patch fix it by adding need_resched check with the idle check, and
> keep the need_resched check in for loop to catch ilb get busy.
> 
> Suggested-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> Reviewed-by: Jason Low <jason.low2@...com>
> Signed-off-by: Wanpeng Li <wanpeng.li@...ux.intel.com>

Looks good to me.

Reviewed-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 0576ce0..788e42f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7638,7 +7638,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
>  	struct rq *rq;
>  	int balance_cpu;
> 
> -	if (idle != CPU_IDLE ||
> +	if (idle != CPU_IDLE || need_resched() ||
>  	    !test_bit(NOHZ_BALANCE_KICK, nohz_flags(this_cpu)))
>  		goto end;
> 
> -- 
> 1.9.1
> 

-- 
Thanks and Regards
Srikar Dronamraju

--
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