From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Ed Tomlinson <edt@aei.ca>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, mingo@elte.hu,
laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de,
rostedt@goodmis.org, Valdis.Kletnieks@vt.edu,
dhowells@redhat.com, eric.dumazet@gmail.com, darren@dvhart.com,
patches@linaro.org, greearb@candelatech.com,
edward.tomlinson@aero.bombardier.com
Subject: Re: [PATCH tip/core/urgent 1/7] rcu: decrease rcu_report_exp_rnp coupling with scheduler
Date: Wed, 20 Jul 2011 06:23:11 -0700 [thread overview]
Message-ID: <20110720132311.GE2400@linux.vnet.ibm.com> (raw)
In-Reply-To: <201107200723.33819.edt@aei.ca>
On Wed, Jul 20, 2011 at 07:23:32AM -0400, Ed Tomlinson wrote:
> On Wednesday 20 July 2011 00:54:15 Paul E. McKenney wrote:
> > On Wed, Jul 20, 2011 at 04:40:18AM +0200, Peter Zijlstra wrote:
> > > On Tue, 2011-07-19 at 17:18 -0700, Paul E. McKenney wrote:
[ . . . ]
> Paul/Peter,
>
> With all 7 fixes applied with the above version of patch 1, I get a warning during boot:
>
> [ 3.443140] EXT4-fs (sdc3): mounted filesystem with ordered data mode. Opts: (null)
> [ 3.456097] VFS: Mounted root (ext4 filesystem) readonly on device 8:35.
> [ 3.469734] devtmpfs: mounted
> [ 3.478488] Freeing unused kernel memory: 628k freed
> [ 3.488590] Write protecting the kernel read-only data: 10240k
> [ 3.500809] Freeing unused kernel memory: 468k freed
> [ 3.514158] Freeing unused kernel memory: 1240k freed
> [ 3.552337] ------------[ cut here ]------------
> [ 3.553004] ------------[ cut here ]------------
> [ 3.553004] WARNING: at kernel/rcutree_plugin.h:414 __rcu_read_unlock+0xc9/0x120()
> [ 3.553004] Hardware name: System Product Name
> [ 3.553004] Modules linked in:
> [ 3.553004] Pid: 1, comm: init Not tainted 3.0.0-rcr-crc+ #342
> [ 3.553004] Call Trace:
> [ 3.553004] [<ffffffff8104b00f>] warn_slowpath_common+0x7f/0xc0
> [ 3.553004] [<ffffffff8104b06a>] warn_slowpath_null+0x1a/0x20
> [ 3.553004] [<ffffffff810bb479>] __rcu_read_unlock+0xc9/0x120
> [ 3.553004] [<ffffffff8157d6b1>] __atomic_notifier_call_chain+0x91/0xb0
> [ 3.553004] [<ffffffff8157d620>] ? notifier_call_chain+0x80/0x80
> [ 3.553004] [<ffffffff812c5860>] ? bit_putcs+0x5b0/0x5b0
> [ 3.553004] [<ffffffff8157d6e6>] atomic_notifier_call_chain+0x16/0x20
> [ 3.553004] [<ffffffff813203c9>] notify_write+0x29/0x30
> [ 3.553004] [<ffffffff81322024>] vt_console_print+0x164/0x3b0
> [ 3.553004] [<ffffffff8104b29e>] __call_console_drivers+0x8e/0xb0
> [ 3.553004] [<ffffffff8104b30a>] _call_console_drivers+0x4a/0x80
> [ 3.553004] [<ffffffff8104b9ed>] console_unlock+0xfd/0x210
> [ 3.553004] [<ffffffff8104c246>] vprintk+0x3f6/0x530
> [ 3.553004] [<ffffffff810bb479>] ? __rcu_read_unlock+0xc9/0x120
> [ 3.553004] [<ffffffff8157585c>] printk+0x41/0x45
> [ 3.553004] [<ffffffff810bb479>] ? __rcu_read_unlock+0xc9/0x120
> [ 3.553004] [<ffffffff8104afcd>] warn_slowpath_common+0x3d/0xc0
> [ 3.553004] [<ffffffff8104b06a>] warn_slowpath_null+0x1a/0x20
> [ 3.553004] [<ffffffff810bb479>] __rcu_read_unlock+0xc9/0x120
> [ 3.553004] [<ffffffff8103fed8>] cpuacct_charge+0xc8/0xe0
> [ 3.553004] [<ffffffff8103fe58>] ? cpuacct_charge+0x48/0xe0
> [ 3.553004] [<ffffffff810326b7>] ? task_of+0x97/0xd0
The WARN_ON_ONCE() is no longer correct. Here is a patch that goes
on top of #4 that fixes it. The bug is in the warning, so if you are
running stably with all seven fixes and only get this warning, then that
is a -very- good sign!
Thanx, Paul
------------------------------------------------------------------------
Fix warning to allow for negative values of ->rcu_read_lock_nesting.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index cb33705..2b5f3e1 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -411,7 +411,11 @@ void __rcu_read_unlock(void)
t->rcu_read_lock_nesting = 0;
}
#ifdef CONFIG_PROVE_LOCKING
- WARN_ON_ONCE(ACCESS_ONCE(t->rcu_read_lock_nesting) < 0);
+ {
+ int rrln = ACCESS_ONCE(t->rcu_read_lock_nesting);
+
+ WARN_ON_ONCE(rrln < 0 && rrln < INT_MIN / 2);
+ }
#endif /* #ifdef CONFIG_PROVE_LOCKING */
}
EXPORT_SYMBOL_GPL(__rcu_read_unlock);
next prev parent reply other threads:[~2011-07-20 13:23 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 0:17 [PATCH rcu/urgent 0/6] Fixes for RCU/scheduler/irq-threads trainwreck Paul E. McKenney
2011-07-20 0:18 ` [PATCH tip/core/urgent 1/7] rcu: decrease rcu_report_exp_rnp coupling with scheduler Paul E. McKenney
2011-07-20 2:40 ` Peter Zijlstra
2011-07-20 4:54 ` Paul E. McKenney
2011-07-20 11:23 ` Ed Tomlinson
2011-07-20 11:31 ` Ed Tomlinson
2011-07-20 12:35 ` Peter Zijlstra
2011-07-20 13:23 ` Paul E. McKenney [this message]
2011-07-20 0:18 ` [PATCH tip/core/urgent 2/7] rcu: Fix RCU_BOOST race handling current->rcu_read_unlock_special Paul E. McKenney
2011-07-20 0:18 ` [PATCH tip/core/urgent 3/7] rcu: Streamline code produced by __rcu_read_unlock() Paul E. McKenney
2011-07-20 0:18 ` [PATCH tip/core/urgent 4/7] rcu: protect __rcu_read_unlock() against scheduler-using irq handlers Paul E. McKenney
2011-07-20 12:54 ` Peter Zijlstra
2011-07-20 13:25 ` Paul E. McKenney
2011-07-20 0:18 ` [PATCH tip/core/urgent 5/7] sched: Add irq_{enter,exit}() to scheduler_ipi() Paul E. McKenney
2011-07-20 0:18 ` [PATCH tip/core/urgent 6/7] softirq,rcu: Inform RCU of irq_exit() activity Paul E. McKenney
2011-07-20 0:18 ` [PATCH tip/core/urgent 7/7] signal: align __lock_task_sighand() irq disabling and RCU Paul E. McKenney
2011-07-20 1:10 ` [PATCH rcu/urgent 0/6] Fixes for RCU/scheduler/irq-threads trainwreck Ben Greear
2011-07-20 1:30 ` Ed Tomlinson
2011-07-20 2:07 ` Ed Tomlinson
2011-07-20 4:44 ` Paul E. McKenney
2011-07-20 5:03 ` Linus Torvalds
2011-07-20 13:34 ` Paul E. McKenney
2011-07-20 17:02 ` Ben Greear
2011-07-20 17:15 ` Paul E. McKenney
2011-07-20 18:44 ` Ingo Molnar
2011-07-20 18:52 ` Peter Zijlstra
2011-07-20 19:01 ` Paul E. McKenney
2011-07-20 19:25 ` Peter Zijlstra
2011-07-20 20:06 ` Paul E. McKenney
2011-07-20 19:02 ` Linus Torvalds
2011-07-20 19:29 ` Paul E. McKenney
2011-07-20 19:39 ` Ingo Molnar
2011-07-20 19:57 ` Ingo Molnar
2011-07-20 20:33 ` Paul E. McKenney
2011-07-20 20:54 ` Ben Greear
2011-07-20 21:12 ` Paul E. McKenney
2011-07-21 3:25 ` Ben Greear
2011-07-21 16:04 ` Paul E. McKenney
2011-07-20 21:04 ` [GIT PULL] RCU fixes for v3.0 Ingo Molnar
2011-07-20 21:55 ` Ed Tomlinson
2011-07-20 22:06 ` Paul E. McKenney
2011-07-20 20:08 ` [PATCH rcu/urgent 0/6] Fixes for RCU/scheduler/irq-threads trainwreck Paul E. McKenney
2011-07-20 21:05 ` Peter Zijlstra
2011-07-20 21:39 ` Paul E. McKenney
2011-07-20 10:49 ` Ed Tomlinson
2011-07-20 18:25 ` [PATCH rcu/urgent 0/7 v2] " Paul E. McKenney
2011-07-20 18:26 ` [PATCH tip/core/urgent 1/7] rcu: decrease rcu_report_exp_rnp coupling with scheduler Paul E. McKenney
2011-07-20 18:26 ` [PATCH tip/core/urgent 2/7] rcu: Fix RCU_BOOST race handling current->rcu_read_unlock_special Paul E. McKenney
2011-07-20 18:26 ` [PATCH tip/core/urgent 3/7] rcu: Streamline code produced by __rcu_read_unlock() Paul E. McKenney
2011-07-20 22:44 ` Linus Torvalds
2011-07-21 5:09 ` Paul E. McKenney
2011-07-20 18:26 ` [PATCH tip/core/urgent 4/7] rcu: protect __rcu_read_unlock() against scheduler-using irq handlers Paul E. McKenney
2011-07-20 18:26 ` [PATCH tip/core/urgent 5/7] sched: Add irq_{enter,exit}() to scheduler_ipi() Paul E. McKenney
2011-07-20 18:26 ` [PATCH tip/core/urgent 6/7] softirq,rcu: Inform RCU of irq_exit() activity Paul E. McKenney
2011-07-20 18:26 ` [PATCH tip/core/urgent 7/7] signal: align __lock_task_sighand() irq disabling and RCU 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=20110720132311.GE2400@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=darren@dvhart.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edt@aei.ca \
--cc=edward.tomlinson@aero.bombardier.com \
--cc=eric.dumazet@gmail.com \
--cc=greearb@candelatech.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=patches@linaro.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.