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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 07 Oct 2011 17:09:46 -0700
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Venki Pallipadi <venki@...gle.com>,
	Ingo Molnar <mingo@...e.hu>,
	Prarit Bhargava <prarit@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...nel.org" <stable@...nel.org>
Subject: Re: [patch v2 1/2] sched: Use resched IPI to kick off the nohz idle
 balance

On Thu, 2011-10-06 at 10:27 -0700, Vivek Goyal wrote:
> On Mon, Oct 03, 2011 at 03:09:00PM -0700, Suresh Siddha wrote:
> [..]
> > 
> >    [ This issue is present from 2.6.35+ kernels, but marking it -stable
> >      only from v3.0+ as the proposed fix depends on the scheduler_ipi()
> >      that is introduced recently. ]
> > 
> 
> Hi Suresh,
> 
> Are you planning to fix this issue for older kernels too? I am wondering
> how to go about fixing it there.
> 

Vivek, Initially when Prarit brought this issue to me, I gave an ugly
quick fix (Appended) for a quick try. But I would recommend we back port
the couple of mainline patches that introduced scheduler_ipi() code
along with these two patches. Thoughts?

---
Quick and dirty fix for the deadlock caused by the nohz balance logic.

Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
---
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index bc8ee99..f48b950 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -3618,6 +3618,7 @@ static DEFINE_PER_CPU(struct call_single_data, remote_sched_softirq_cb);
 static void trigger_sched_softirq(void *data)
 {
 	raise_softirq_irqoff(SCHED_SOFTIRQ);
+	this_rq()->nohz_balance_kick = 2;
 }
 
 static inline void init_sched_softirq_csd(struct call_single_data *csd)
@@ -3977,7 +3978,7 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle)
 	struct rq *rq;
 	int balance_cpu;
 
-	if (idle != CPU_IDLE || !this_rq->nohz_balance_kick)
+	if (idle != CPU_IDLE || (this_rq->nohz_balance_kick != 2))
 		return;
 
 	for_each_cpu(balance_cpu, nohz.idle_cpus_mask) {


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