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:26:34 -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 1/6] sched, nohz: introduce nohz_flags in the struct
 rq

On Tue, 2011-12-06 at 04:14 -0800, Srivatsa Vaddagiri wrote:
> * Suresh Siddha <suresh.b.siddha@...el.com> [2011-12-01 17:07:32]:
> 
> > @@ -4866,18 +4866,15 @@ static void nohz_balancer_kick(int cpu)
> >  			return;
> >  	}
> > 
> > -	if (!cpu_rq(ilb_cpu)->nohz_balance_kick) {
> > -		cpu_rq(ilb_cpu)->nohz_balance_kick = 1;
> > -
> > -		smp_mb();
> > -		/*
> > -		 * Use smp_send_reschedule() instead of resched_cpu().
> > -		 * This way we generate a sched IPI on the target cpu which
> > -		 * is idle. And the softirq performing nohz idle load balance
> > -		 * will be run before returning from the IPI.
> > -		 */
> > -		smp_send_reschedule(ilb_cpu);
> > -	}
> > +	if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(cpu)))
> 
> s/cpu/ilb_cpu?

correct. Thanks again. Peter, can you queue the appended fix too?

> Also given that 'cpu' argument to nohz_balancer_kick() is no longer used, we can
> avoid passing any argument to it as well ..

we do use it currently in the find_new_ilb().

thanks,
suresh
---

From: Suresh Siddha <suresh.b.siddha@...el.com>
Subject: sched, nohz: set the NOHZ_BALANCE_KICK flag for idle load balancer

Intention is to set the NOHZ_BALANCE_KICK flag for the 'ilb_cpu'. Not
for the 'cpu' which is the local cpu. Fix the typo.

Reported-by: Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
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..9e34688 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4852,7 +4852,7 @@ static void nohz_balancer_kick(int cpu)
 	if (ilb_cpu >= nr_cpu_ids)
 		return;
 
-	if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(cpu)))
+	if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(ilb_cpu)))
 		return;
 	/*
 	 * Use smp_send_reschedule() instead of resched_cpu().


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