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]
Date:	Tue, 06 Dec 2011 11:19:37 -0800
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
	Venki Pallipadi <venki@...gle.com>,
	Mike Galbraith <efault@....de>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Tim Chen <tim.c.chen@...ux.jf.intel.com>,
	"Shi, Alex" <alex.shi@...el.com>
Subject: Re: [patch v3 3/6] sched, nohz: sched group, domain aware nohz idle
 load balancing

On Mon, 2011-12-05 at 22:37 -0800, Srivatsa Vaddagiri wrote:
> * Suresh Siddha <suresh.b.siddha@...el.com> [2011-12-01 17:07:34]:
> 
> > @@ -5090,7 +5019,7 @@ static void nohz_idle_balance(int this_c
> >  		goto end;
> > 
> >  	for_each_cpu(balance_cpu, nohz.idle_cpus_mask) {
> > -		if (balance_cpu == this_cpu)
> > +		if (balance_cpu == this_cpu || !idle_cpu(this_cpu))
> >  			continue;
> 
> Hmm ..did you mean to use '!idle_cpu(balance_cpu)' there?

Thanks for reviewing closely. yes, it was a typo. Peter, please queue up
this fix.
---

From: Suresh Siddha <suresh.b.siddha@...el.com>
Subject: sched, nohz: fix the idle cpu check in nohz_idle_balance

cpu bit in the nohz.idle_cpu_mask are reset in the first busy tick after
exiting idle. So during nohz_idle_balance(), intention is to double
check if the cpu that is part of the idle_cpu_mask is indeed idle before
going ahead in performing idle balance for that cpu.

Fix the cpu typo in the idle_cpu() check during nohz_idle_balance().

Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
---
 kernel/sched/fair.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 65a6f8b..0bcd144 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5019,7 +5019,7 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle)
 		goto end;
 
 	for_each_cpu(balance_cpu, nohz.idle_cpus_mask) {
-		if (balance_cpu == this_cpu || !idle_cpu(this_cpu))
+		if (balance_cpu == this_cpu || !idle_cpu(balance_cpu))
 			continue;
 
 		/*


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