linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: paulmck@linux.vnet.ibm.com (Paul E. McKenney)
To: linux-arm-kernel@lists.infradead.org
Subject: rcu self-detected stall messages on OMAP3, 4 boards
Date: Fri, 21 Sep 2012 17:05:37 -0700	[thread overview]
Message-ID: <20120922000537.GH2454@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1209212240190.31812@utopia.booyaka.com>

On Fri, Sep 21, 2012 at 10:41:14PM +0000, Paul Walmsley wrote:
> On Fri, 21 Sep 2012, Paul E. McKenney wrote:
> 
> > On Fri, Sep 21, 2012 at 05:47:31PM +0000, Paul Walmsley wrote:
> >
> > > I built an OMAP kernel from Linus' commit 
> > > 4651afbbae968772efd6dc4ba461cba9b49bb9d8 ("Merge branch 'for-3.6-fixes' of 
> > > git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq").  The config used 
> > > was 'omap2plus_defconfig', and enabled CONFIG_CPU_IDLE by hand.  Booted it 
> > > on a Pandaboard (OMAP4430ES2) into a very minimal Debian rootfs.
> > 
> > Did you have the patch at https://lkml.org/lkml/2012/8/30/290 applied?
> 
> No, it's just as described above.
> 
> > If not, could you please try it?  (This patch cleared up a similar
> > problem for Becky, also on OMAP.)
> 
> Did not seem to help, either with or without CONFIG_CPU_IDLE.

I was hoping!  ;-)

And my init=/bin/sh kernel ran idle for more than an hour without
any RCU CPU stall warnings...

I am wondering if your system somehow figured out how to start a grace
period that had no RCU callbacks waiting for it.  If that happened,
then a CONFIG_NO_HZ=y system could in theory get into a state where all
CPUs are in dyntick-idle mode, so that none of them is doing anything
to force the grace period to complete.

That should be easy to diagnose, anyway.  Please see below, which
includes the earlier diagnostic patch.

							Thanx, Paul

------------------------------------------------------------------------

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 307caf1..696f189 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -879,6 +879,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
 	unsigned long flags;
 	int ndetected = 0;
 	struct rcu_node *rnp = rcu_get_root(rsp);
+	long totqlen = 0;
 
 	/* Only let one CPU complain about others per time interval. */
 
@@ -923,8 +924,11 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
 	raw_spin_unlock_irqrestore(&rnp->lock, flags);
 
 	print_cpu_stall_info_end();
-	printk(KERN_CONT "(detected by %d, t=%ld jiffies)\n",
-	       smp_processor_id(), (long)(jiffies - rsp->gp_start));
+	for_each_possible_cpu(cpu)
+		totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen;
+	pr_cont("(detected by %d, t=%ld jiffies, g=%lu, c=%lu, q=%lu)\n",
+	       smp_processor_id(), (long)(jiffies - rsp->gp_start),
+	       rsp->gpnum, rsp->completed, totqlen);
 	if (ndetected == 0)
 		printk(KERN_ERR "INFO: Stall ended before state dump start\n");
 	else if (!trigger_all_cpu_backtrace())
@@ -939,8 +943,10 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
 
 static void print_cpu_stall(struct rcu_state *rsp)
 {
+	int cpu;
 	unsigned long flags;
 	struct rcu_node *rnp = rcu_get_root(rsp);
+	long totqlen = 0;
 
 	/*
 	 * OK, time to rat on ourselves...
@@ -951,7 +957,10 @@ static void print_cpu_stall(struct rcu_state *rsp)
 	print_cpu_stall_info_begin();
 	print_cpu_stall_info(rsp, smp_processor_id());
 	print_cpu_stall_info_end();
-	printk(KERN_CONT " (t=%lu jiffies)\n", jiffies - rsp->gp_start);
+	for_each_possible_cpu(cpu)
+		totqlen += per_cpu_ptr(rsp->rda, cpu)->qlen;
+	pr_cont(" (t=%lu jiffies g=%lu c=%lu q=%lu)\n",
+		jiffies - rsp->gp_start, rsp->gpnum, rsp->completed, totqlen);
 	if (!trigger_all_cpu_backtrace())
 		dump_stack();
 

  reply	other threads:[~2012-09-22  0:05 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 22:51 rcu self-detected stall messages on OMAP3, 4 boards Paul Walmsley
2012-09-13  1:12 ` Paul E. McKenney
2012-09-13 18:52   ` Paul Walmsley
2012-09-20  0:03     ` Paul E. McKenney
2012-09-20  7:56       ` Paul Walmsley
2012-09-20 15:03         ` Bruce, Becky
2012-09-20 21:49         ` Bruce, Becky
2012-09-20 22:01           ` Paul E. McKenney
2012-09-20 22:47             ` Paul Walmsley
2012-09-20 23:21               ` Paul E. McKenney
2012-09-21 18:08                 ` Paul Walmsley
2012-09-21 18:58                   ` Paul E. McKenney
2012-09-21 19:11                     ` Paul Walmsley
2012-09-21 19:57                       ` Paul E. McKenney
2012-09-21 20:31                         ` Tony Lindgren
2012-09-21 22:03                           ` Paul E. McKenney
2012-09-22 15:45                             ` Frederic Weisbecker
2012-09-22 16:00                               ` Paul E. McKenney
2012-09-21 22:12                         ` Paul E. McKenney
2012-09-22 18:42                         ` Paul Walmsley
2012-09-22 20:10                           ` Paul E. McKenney
2012-09-22 21:59                             ` Paul E. McKenney
2012-09-22 22:25                               ` Paul Walmsley
2012-09-22 23:11                                 ` Paul E. McKenney
2012-09-23  7:55                                   ` Paul Walmsley
2012-09-23 12:11                                     ` Paul E. McKenney
2012-09-23  1:42                                 ` Paul Walmsley
2012-09-23  1:56                                   ` Paul E. McKenney
2012-09-23  2:01                                     ` Paul Walmsley
2012-09-24  9:41                               ` Shilimkar, Santosh
2012-09-24 13:18                                 ` Paul E. McKenney
2012-10-01  8:55                               ` Linus Walleij
2012-10-01 13:28                                 ` Paul E. McKenney
2012-09-21 18:59                   ` Paul Walmsley
2012-09-21 17:47               ` Paul Walmsley
2012-09-21 17:51                 ` Paul Walmsley
2012-09-21 21:20                 ` Paul E. McKenney
2012-09-21 22:41                   ` Paul Walmsley
2012-09-22  0:05                     ` Paul E. McKenney [this message]
2012-09-22 18:16                       ` Paul Walmsley
2012-09-22 19:52                         ` Paul E. McKenney
2012-09-22 22:20                           ` Paul Walmsley
2012-09-22 23:17                             ` Paul E. McKenney
2012-09-24 21:54                               ` Paul Walmsley
2012-09-24 22:00                                 ` Paul E. McKenney

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=20120922000537.GH2454@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).