mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
	Venki Pallipadi <venki@google.com>, Ingo Molnar <mingo@elte.hu>,
	Prarit Bhargava <prarit@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@kernel.org" <stable@kernel.org>
Subject: Re: [patch v2 1/2] sched: Use resched IPI to kick off the nohz idle balance
Date: Fri, 07 Oct 2011 17:09:46 -0700	[thread overview]
Message-ID: <1318032586.11592.206.camel@sbsiddha-desk.sc.intel.com> (raw)
In-Reply-To: <20111006172731.GA31781@redhat.com>

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@intel.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) {



  reply	other threads:[~2011-10-08  0:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 22:09 Suresh Siddha
2011-10-03 22:09 ` [patch v2 2/2] sched: Request for idle balance during nohz idle load balance Suresh Siddha
2011-10-04  9:05 ` [patch v2 1/2] sched: Use resched IPI to kick off the nohz idle balance Peter Zijlstra
2011-10-04 18:03   ` Suresh Siddha
2011-10-06 17:27 ` Vivek Goyal
2011-10-08  0:09   ` Suresh Siddha [this message]
2011-10-10 13:52     ` Vivek Goyal
2011-10-10 14:06       ` Peter Zijlstra
2011-10-10 15:25         ` Vivek Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1318032586.11592.206.camel@sbsiddha-desk.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=prarit@redhat.com \
    --cc=stable@kernel.org \
    --cc=vatsa@linux.vnet.ibm.com \
    --cc=venki@google.com \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®