From: Frederic Weisbecker <fweisbec@gmail.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [GIT PULL rcu/next] rcu commits for 2.6.40
Date: Thu, 19 May 2011 16:47:43 +0200 [thread overview]
Message-ID: <20110519144740.GC1956@nowhere> (raw)
In-Reply-To: <4DD49DAF.5080605@kernel.org>
On Wed, May 18, 2011 at 09:33:51PM -0700, Yinghai Lu wrote:
> ...
> [ 89.913205] ------------[ cut here ]------------
> [ 89.913216] WARNING: at kernel/rcutree.c:352 rcu_enter_nohz+0x49/0x8b()
> [ 89.913220] Hardware name: Sun Fire X4800 M2
> [ 89.913224] Modules linked in:
> [ 89.913230] Switched to NOHz mode on CPU #34
> [ 89.913237] Pid: 0, comm: swapper Tainted: G W 2.6.39-rc7-tip-yh-05281-g8e9254b-dirty #1019
> [ 89.913242] Call Trace:
> [ 89.913269] [<ffffffff81080144>] warn_slowpath_common+0x85/0x9d
> [ 89.913280] [<ffffffff81080176>] warn_slowpath_null+0x1a/0x1c
> [ 89.913290] [<ffffffff810d32cc>] rcu_enter_nohz+0x49/0x8b
> [ 89.913305] [<ffffffff810ab121>] tick_nohz_stop_sched_tick+0x27d/0x366
> [ 89.913317] [<ffffffff810391bc>] cpu_idle+0x7a/0xcc
> [ 89.913329] [<ffffffff81bda6e3>] rest_init+0xb7/0xbe
> [ 89.913340] [<ffffffff81bda62c>] ? csum_partial_copy_generic+0x16c/0x16c
> [ 89.913352] [<ffffffff82742e39>] start_kernel+0x3b2/0x3bd
> [ 89.913363] [<ffffffff827422cc>] x86_64_start_reservations+0x9c/0xa0
> [ 89.913374] [<ffffffff827424a8>] x86_64_start_kernel+0x1d8/0x1e3
> [ 89.913379] ---[ end trace a7919e7f17c0a726 ]---
> [ 89.913401] Dumping ftrace buffer:
> [ 89.913417] Switched to NOHz mode on CPU #4
> [ 89.913428] ---------------------------------
> [ 89.913444] Switched to NOHz mode on CPU #54
> [ 89.913467] CPU:0 [LOST 39120 EVENTS]
<snip>
> [ 89.918480] <idle>-0 0d... 89913074us : <stack trace>
> [ 89.918482] => rcu_irq_enter
> [ 89.918484] => irq_enter
> [ 89.918486] => smp_apic_timer_interrupt
> [ 89.918488] => apic_timer_interrupt
> [ 89.918489] => cpu_idle
> [ 89.918491] => rest_init
> [ 89.918492] => start_kernel
> [ 89.918494] => x86_64_start_reservations
> [ 89.918517] <idle>-0 0dN.. 89913130us : <stack trace>
> [ 89.918519] => rcu_irq_exit
> [ 89.918521] => irq_exit
> [ 89.918522] => smp_apic_timer_interrupt
> [ 89.918524] => apic_timer_interrupt
> [ 89.918526] => cpu_idle
> [ 89.918527] => rest_init
> [ 89.918529] => start_kernel
> [ 89.918530] => x86_64_start_reservations
> [ 89.918552] <idle>-0 0d... 89913196us : <stack trace>
> [ 89.918555] => rcu_enter_nohz
> [ 89.918556] => tick_nohz_stop_sched_tick
> [ 89.918558] => cpu_idle
> [ 89.918560] => rest_init
> [ 89.918561] => start_kernel
> [ 89.918563] => x86_64_start_reservations
> [ 89.918565] => x86_64_start_kernel
> [ 89.918569] ---------------------------------
So, the warning triggered there. But the pairing looks actually good,
given we had an interrupt right before that and it has called
irq_enter and irq_exit.
I have no clue about what happened there.
It may be easier if we have the value of dynticks and dynticks_nesting.
Can you please test the following branch?
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
rcu/debug
It's Paul's branch + the early_initcall fix + the following patch:
---
commit 14667f347dea62d9e5a08e0f614840e50f73002c
Author: Frederic Weisbecker <fweisbec@gmail.com>
Date: Thu May 19 16:25:19 2011 +0200
rcu: Trace dynticks internal values
To debug some nasty count bug.
Not-signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index f30aea3..49d6348 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -349,6 +349,7 @@ void rcu_enter_nohz(void)
local_irq_save(flags);
trace_dump_stack();
rdtp = &__get_cpu_var(rcu_dynticks);
+ trace_printk("%x %x\n", atomic_read(&rdtp->dynticks), rdtp->dynticks_nesting);
if (WARN_ON_ONCE(rdtp->dynticks_nesting != 1))
ftrace_dump(DUMP_ORIG);
rdtp->dynticks_nesting = 1;
@@ -388,6 +389,7 @@ void rcu_exit_nohz(void)
local_irq_save(flags);
trace_dump_stack();
rdtp = &__get_cpu_var(rcu_dynticks);
+ trace_printk("%x %x\n", atomic_read(&rdtp->dynticks), rdtp->dynticks_nesting);
if (WARN_ON_ONCE(rdtp->dynticks_nesting != 0))
ftrace_dump(DUMP_ORIG);
rdtp->dynticks_nesting = 0;
@@ -463,9 +465,12 @@ void rcu_nmi_exit(void)
void rcu_irq_enter(void)
{
unsigned long flags;
+ struct rcu_dynticks *rdtp;
local_irq_save(flags);
trace_dump_stack();
+ rdtp = &__get_cpu_var(rcu_dynticks);
+ trace_printk("%x %x\n", atomic_read(&rdtp->dynticks), rdtp->dynticks_nesting);
__rcu_exit_nohz();
local_irq_restore(flags);
}
@@ -480,9 +485,12 @@ void rcu_irq_enter(void)
void rcu_irq_exit(void)
{
unsigned long flags;
+ struct rcu_dynticks *rdtp;
local_irq_save(flags);
trace_dump_stack();
+ rdtp = &__get_cpu_var(rcu_dynticks);
+ trace_printk("%x %x\n", atomic_read(&rdtp->dynticks), rdtp->dynticks_nesting);
__rcu_enter_nohz();
local_irq_restore(flags);
}
next prev parent reply other threads:[~2011-05-19 14:47 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 15:18 [GIT PULL rcu/next] rcu commits for 2.6.40 Paul E. McKenney
2011-05-09 7:36 ` Ingo Molnar
2011-05-09 21:09 ` Yinghai Lu
2011-05-10 8:56 ` Paul E. McKenney
2011-05-10 9:37 ` Ingo Molnar
2011-05-10 18:04 ` Yinghai Lu
2011-05-10 19:32 ` Paul E. McKenney
2011-05-10 20:52 ` Yinghai Lu
2011-05-11 4:54 ` Paul E. McKenney
2011-05-11 6:03 ` Yinghai Lu
2011-05-11 6:42 ` Yinghai Lu
2011-05-11 20:13 ` Paul E. McKenney
2011-05-11 16:54 ` Yinghai Lu
2011-05-11 16:56 ` Yinghai Lu
2011-05-11 20:18 ` Paul E. McKenney
2011-05-11 20:59 ` Yinghai Lu
2011-05-11 21:30 ` Yinghai Lu
2011-05-11 23:02 ` Yinghai Lu
2011-05-12 6:03 ` Ingo Molnar
2011-05-12 7:27 ` Yinghai Lu
2011-05-12 7:42 ` Yinghai Lu
2011-05-12 9:20 ` Paul E. McKenney
2011-05-12 17:31 ` Yinghai Lu
2011-05-12 21:36 ` Yinghai Lu
2011-05-13 1:28 ` Yinghai Lu
2011-05-13 8:42 ` Ingo Molnar
2011-05-13 12:19 ` Ingo Molnar
2011-05-13 13:04 ` Ingo Molnar
2011-05-13 13:12 ` Ingo Molnar
2011-05-13 14:14 ` Paul E. McKenney
2011-05-13 15:07 ` Ingo Molnar
2011-05-13 16:26 ` Paul E. McKenney
2011-05-16 7:08 ` Ingo Molnar
2011-05-16 7:48 ` Paul E. McKenney
2011-05-16 11:51 ` Ingo Molnar
2011-05-16 12:23 ` Ingo Molnar
2011-05-16 14:30 ` Ingo Molnar
2011-05-16 21:33 ` Paul E. McKenney
2011-05-16 22:07 ` Paul E. McKenney
2011-05-16 21:24 ` Paul E. McKenney
2011-05-16 23:52 ` Frederic Weisbecker
2011-05-17 2:40 ` Frederic Weisbecker
2011-05-17 7:53 ` Paul E. McKenney
2011-05-17 12:43 ` Frederic Weisbecker
2011-05-17 22:21 ` Paul E. McKenney
2011-05-18 21:10 ` Yinghai Lu
2011-05-18 23:13 ` Frederic Weisbecker
2011-05-19 4:33 ` Yinghai Lu
2011-05-19 14:47 ` Frederic Weisbecker [this message]
2011-05-19 19:51 ` Yinghai Lu
2011-05-19 21:15 ` Frederic Weisbecker
2011-05-19 21:45 ` Yinghai Lu
2011-05-20 0:09 ` [PATCH] rcu: Fix unpaired rcu_irq_enter() from locking selftests Frederic Weisbecker
2011-05-20 8:36 ` Ingo Molnar
2011-05-20 15:12 ` Paul E. McKenney
2011-05-20 15:11 ` Paul E. McKenney
2011-05-20 0:14 ` [GIT PULL rcu/next] rcu commits for 2.6.40 Frederic Weisbecker
2011-05-13 14:40 ` Ingo Molnar
2011-05-13 16:38 ` Paul E. McKenney
2011-05-16 7:10 ` Ingo Molnar
2011-05-13 21:08 ` Yinghai Lu
2011-05-14 14:26 ` Paul E. McKenney
2011-05-14 15:31 ` Paul E. McKenney
2011-05-14 18:34 ` Paul E. McKenney
2011-05-15 3:59 ` Yinghai Lu
2011-05-15 4:14 ` Yinghai Lu
2011-05-15 5:41 ` Yinghai Lu
2011-05-15 5:49 ` Yinghai Lu
2011-05-15 6:04 ` Paul E. McKenney
2011-05-15 6:59 ` Paul E. McKenney
2011-05-16 7:08 ` Paul E. McKenney
2011-05-16 7:39 ` Ingo Molnar
2011-05-15 6:01 ` Paul E. McKenney
2011-05-15 22:01 ` Frederic Weisbecker
2011-05-16 5:56 ` Paul E. McKenney
2011-05-16 22:40 ` Frederic Weisbecker
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=20110519144740.GC1956@nowhere \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=yinghai@kernel.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).