Frederic Weisbecker
416eb33cd6
rcu: Fix early call to rcu_idle_enter()
On the irq exit path, tick_nohz_irq_exit()
may raise a softirq, which action leads to the wake up
path and select_task_rq_fair() that makes use of rcu
to iterate the domains.
This is an illegal use of RCU because we may be in RCU
extended quiescent state if we interrupted an RCU-idle
window in the idle loop:
[ 132.978883] ===============================
[ 132.978883] [ INFO: suspicious RCU usage. ]
[ 132.978883] -------------------------------
[ 132.978883] kernel/sched_fair.c:1707 suspicious rcu_dereference_check() usage!
[ 132.978883]
[ 132.978883] other info that might help us debug this:
[ 132.978883]
[ 132.978883]
[ 132.978883] rcu_scheduler_active = 1, debug_locks = 0
[ 132.978883] RCU used illegally from extended quiescent state!
[ 132.978883] 2 locks held by swapper/0:
[ 132.978883] #0: (&p->pi_lock){-.-.-.}, at: [<ffffffff8105a729>] try_to_wake_up+0x39/0x2f0
[ 132.978883] #1: (rcu_read_lock){.+.+..}, at: [<ffffffff8105556a>] select_task_rq_fair+0x6a/0xec0
[ 132.978883]
[ 132.978883] stack backtrace:
[ 132.978883] Pid: 0, comm: swapper Tainted: G W 3.0.0+ #178
[ 132.978883] Call Trace:
[ 132.978883] <IRQ> [<ffffffff810a01f6>] lockdep_rcu_suspicious+0xe6/0x100
[ 132.978883] [<ffffffff81055c49>] select_task_rq_fair+0x749/0xec0
[ 132.978883] [<ffffffff8105556a>] ? select_task_rq_fair+0x6a/0xec0
[ 132.978883] [<ffffffff812fe494>] ? do_raw_spin_lock+0x54/0x150
[ 132.978883] [<ffffffff810a1f2d>] ? trace_hardirqs_on+0xd/0x10
[ 132.978883] [<ffffffff8105a7c3>] try_to_wake_up+0xd3/0x2f0
[ 132.978883] [<ffffffff81094f98>] ? ktime_get+0x68/0xf0
[ 132.978883] [<ffffffff8105aa35>] wake_up_process+0x15/0x20
[ 132.978883] [<ffffffff81069dd5>] raise_softirq_irqoff+0x65/0x110
[ 132.978883] [<ffffffff8108eb65>] __hrtimer_start_range_ns+0x415/0x5a0
[ 132.978883] [<ffffffff812fe3ee>] ? do_raw_spin_unlock+0x5e/0xb0
[ 132.978883] [<ffffffff8108ed08>] hrtimer_start+0x18/0x20
[ 132.978883] [<ffffffff8109c9c3>] tick_nohz_stop_sched_tick+0x393/0x450
[ 132.978883] [<ffffffff810694f2>] irq_exit+0xd2/0x100
[ 132.978883] [<ffffffff81829e96>] do_IRQ+0x66/0xe0
[ 132.978883] [<ffffffff81820d53>] common_interrupt+0x13/0x13
[ 132.978883] <EOI> [<ffffffff8103434b>] ? native_safe_halt+0xb/0x10
[ 132.978883] [<ffffffff810a1f2d>] ? trace_hardirqs_on+0xd/0x10
[ 132.978883] [<ffffffff810144ea>] default_idle+0xba/0x370
[ 132.978883] [<ffffffff810147fe>] amd_e400_idle+0x5e/0x130
[ 132.978883] [<ffffffff8100a9f6>] cpu_idle+0xb6/0x120
[ 132.978883] [<ffffffff817f217f>] rest_init+0xef/0x150
[ 132.978883] [<ffffffff817f20e2>] ? rest_init+0x52/0x150
[ 132.978883] [<ffffffff81ed9cf3>] start_kernel+0x3da/0x3e5
[ 132.978883] [<ffffffff81ed9346>] x86_64_start_reservations+0x131/0x135
[ 132.978883] [<ffffffff81ed944d>] x86_64_start_kernel+0x103/0x112
Fix this by calling rcu_idle_enter() after tick_nohz_irq_exit().
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2011-12-11 10:31:38 -08:00
..
2011-11-06 19:44:47 -08:00
2011-12-07 16:31:22 +01:00
2011-07-26 16:49:45 -07:00
2011-12-02 11:54:24 +01:00
2011-11-23 21:03:38 +01:00
2011-12-11 10:31:36 -08:00
2011-12-11 10:31:25 -08:00
2010-08-09 16:48:42 -04:00
2011-10-31 09:20:12 -04:00
2011-07-20 14:10:11 -07:00
2011-03-14 09:15:23 -04:00
2011-10-31 09:20:12 -04:00
2010-10-30 01:42:19 -04:00
2011-03-03 10:55:40 -08:00
2011-10-31 09:20:12 -04:00
2011-03-23 19:46:28 -07:00
2011-10-31 09:20:12 -04:00
2011-11-24 11:58:22 -08:00
2011-11-02 16:07:03 -07:00
2011-10-31 19:30:05 -04:00
2011-07-25 20:57:15 -07:00
2011-09-23 12:05:29 +05:30
2011-11-06 19:44:47 -08:00
2011-11-06 19:44:47 -08:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-07-14 12:59:14 +03:00
2011-10-31 09:20:12 -04:00
2010-08-09 20:45:05 -07:00
2011-10-31 17:30:45 -07:00
2011-05-20 08:56:56 +02:00
2011-11-17 20:49:06 +08:00
2011-11-06 19:44:47 -08:00
2011-03-23 19:47:08 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-28 08:43:52 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-12-05 13:28:46 -05:00
2011-03-25 17:52:22 -07:00
2011-04-10 17:01:05 +02:00
2011-06-10 15:15:40 +02:00
2011-10-30 15:16:42 +01:00
2011-10-31 09:20:12 -04:00
2011-10-26 13:10:39 +10:30
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:13 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-12-11 10:31:30 -08:00
2011-10-28 12:02:27 -07:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-04-14 08:52:33 +02:00
2011-10-31 09:20:12 -04:00
2011-04-14 08:52:33 +02:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-07 07:54:42 +10:30
2011-10-31 09:20:13 -04:00
2011-03-23 19:46:58 -07:00
2011-10-31 09:20:12 -04:00
2011-10-26 16:17:32 +02:00
2011-10-31 09:20:12 -04:00
2011-12-09 07:50:28 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:11 -04:00
2011-09-28 21:38:21 -07:00
2011-12-11 10:31:30 -08:00
2011-10-31 09:20:13 -04:00
2011-12-11 10:31:30 -08:00
2011-12-11 10:31:26 -08:00
2011-12-11 10:31:29 -08:00
2011-12-11 10:31:24 -08:00
2011-12-11 10:31:30 -08:00
2011-12-11 10:31:28 -08:00
2011-10-31 09:20:12 -04:00
2011-03-23 19:46:22 -07:00
2011-10-31 09:20:12 -04:00
2011-01-27 21:13:51 -05:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-03-31 11:26:23 -03:00
2011-07-01 10:39:08 +02:00
2011-10-31 09:20:12 -04:00
2011-08-14 12:01:11 +02:00
2011-08-14 12:01:11 +02:00
2011-04-24 13:18:38 +02:00
2011-11-16 08:43:45 +01:00
2011-11-14 12:50:40 +01:00
2011-04-14 08:52:36 +02:00
2011-11-14 12:50:40 +01:00
2011-09-13 11:11:55 +02:00
2011-08-14 12:01:13 +02:00
2011-11-14 12:50:43 +01:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-12-11 10:31:38 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 17:30:44 -07:00
2011-11-06 19:44:47 -08:00
2011-10-03 14:13:01 -04:00
2011-08-12 16:21:35 -05:00
2011-10-31 17:46:07 -07:00
2011-09-19 17:04:37 -07:00
2010-10-14 08:55:27 +02:00
2011-10-31 09:20:12 -04:00
2011-12-09 07:50:29 -08:00
2011-08-10 20:38:14 -04:00
2011-09-19 17:10:57 -07:00
2011-03-23 19:47:08 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:53 -07:00
2010-06-29 10:07:14 +02:00
2011-10-31 09:20:12 -04:00