public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com,
	dipankar@in.ibm.com, akpm@linux-foundation.org,
	mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org,
	dvhltc@us.ibm.com, niv@us.ibm.com, tglx@linutronix.de,
	peterz@infradead.org, rostedt@goodmis.org,
	Valdis.Kletnieks@vt.edu, dhowells@redhat.com
Subject: Re: [PATCH tip/core/rcu 0/2] more lockdep-RCU and RCU_FAST_NO_HZ fixes
Date: Sun, 28 Feb 2010 08:32:18 -0800	[thread overview]
Message-ID: <20100228163218.GD6846@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100228085505.GA2067@elte.hu>

On Sun, Feb 28, 2010 at 09:55:05AM +0100, Ingo Molnar wrote:
> 
> * Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> 
> > Hello!
> > 
> > This series (1) makes RCU_FAST_NO_HZ actually do the full number of
> > iterations specified instead of just one and (2) fixes an RCU lockdep
> > splat.
> 
> Thanks, applied.
> 
> This one is pretty stubborn, it still triggers:
> 
> [    0.000000]       soft-irq read-recursion/321:  ok  |
> [    0.000000] -------------------------------------------------------
> [    0.000000] Good, all 218 testcases passed! |
> [    0.000000] ---------------------------------
> [    0.000000] allocated 10485760 bytes of page_cgroup
> [    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
> [    0.000000] 
> [    0.000000] ===================================================
> [    0.000000] [ INFO: suspicious rcu_dereference_check() usage. ]
> [    0.000000] ---------------------------------------------------
> [    0.000000] kernel/sched_fair.c:3479 invoked rcu_dereference_check() without protection!
> [    0.000000] 
> [    0.000000] other info that might help us debug this:
> [    0.000000] 
> [    0.000000] no locks held by swapper/0.
> [    0.000000] 
> [    0.000000] stack backtrace:
> [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.33-tip-01015-g97e7da3-dirty #10753
> [    0.000000] Call Trace:
> [    0.000000]  <IRQ>  [<ffffffff8107f5d1>] lockdep_rcu_dereference+0xa1/0xb0
> [    0.000000]  [<ffffffff8104afd1>] scheduler_tick+0x221/0x2c0
> [    0.000000]  [<ffffffff8105f6d5>] update_process_times+0x55/0x70
> [    0.000000]  [<ffffffff8107ac27>] tick_periodic+0x27/0x70
> [    0.000000]  [<ffffffff8107ac8f>] tick_handle_periodic+0x1f/0x90
> [    0.000000]  [<ffffffff8100e29a>] timer_interrupt+0x1a/0x30
> [    0.000000]  [<ffffffff810a28aa>] handle_IRQ_event+0x3a/0xe0
> [    0.000000]  [<ffffffff810a53ab>] handle_level_irq+0x8b/0x130
> [    0.000000]  [<ffffffff8100da94>] handle_irq+0x44/0x70
> [    0.000000]  [<ffffffff8100cfde>] do_IRQ+0x6e/0xf0
> [    0.000000]  [<ffffffff817eea13>] ret_from_intr+0x0/0x16
> [    0.000000]  <EOI>  [<ffffffff8102dfe6>] ? native_restore_fl+0x6/0x10
> [    0.000000]  [<ffffffff817ee3df>] _raw_spin_unlock_irqrestore+0x6f/0x80
> [    0.000000]  [<ffffffff810a37f3>] __setup_irq+0x1b3/0x3b0
> [    0.000000]  [<ffffffff810a3a18>] setup_irq+0x28/0x40
> [    0.000000]  [<ffffffff81ef2914>] setup_default_timer_irq+0x12/0x14
> [    0.000000]  [<ffffffff81ef292d>] hpet_time_init+0x17/0x19
> [    0.000000]  [<ffffffff81ef28fb>] x86_late_time_init+0xa/0x11
> [    0.000000]  [<ffffffff81eefcf4>] start_kernel+0x25f/0x2e6
> [    0.000000]  [<ffffffff81eef30b>] x86_64_start_reservations+0xf6/0xfa
> [    0.000000]  [<ffffffff81eef409>] x86_64_start_kernel+0xfa/0x109
> [    0.000000] Fast TSC calibration using PIT
> [    0.000000] Detected 2002.507 MHz processor.
> [    0.004004] Calibrating delay loop (skipped), value calculated using timer frequency.. 4005.01 BogoMIPS (lpj=2002507)

Ah -- this is a new arrival from my viewpoint.  Patch below!

This won't apply to tip/core/rcu, but does against current tip/master.

							Thanx, Paul

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

sched: fix rcu_dereference() for RCU-lockde

Make rcu_dereference() of runqueue data structures be
rcu_dereference_sched().

Located-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

 sched_fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 3e1fd96..5a5ea2c 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -3476,7 +3476,7 @@ static void run_rebalance_domains(struct softirq_action *h)
 
 static inline int on_null_domain(int cpu)
 {
-	return !rcu_dereference(cpu_rq(cpu)->sd);
+	return !rcu_dereference_sched(cpu_rq(cpu)->sd);
 }
 
 /*

  reply	other threads:[~2010-02-28 16:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27 22:52 [PATCH tip/core/rcu 0/2] more lockdep-RCU and RCU_FAST_NO_HZ fixes Paul E. McKenney
2010-02-27 22:53 ` [PATCH tip/core/rcu 1/2] rcu: fix holdoff for accelerated GPs for last non-dynticked CPU Paul E. McKenney
2010-02-28  8:59   ` [tip:core/rcu] rcu: Fix " tip-bot for Paul E. McKenney
2010-03-16 11:00     ` Ingo Molnar
2010-03-16 11:03       ` Ingo Molnar
2010-03-16 11:51         ` Ingo Molnar
2010-03-16 12:15           ` Ingo Molnar
2010-03-16 13:30             ` Paul E. McKenney
2010-03-17 17:53         ` Ingo Molnar
2010-03-17 19:22           ` Paul E. McKenney
2010-03-17 19:35             ` Ingo Molnar
2010-02-27 22:53 ` [PATCH tip/core/rcu 2/2] rcu: make task_subsys_state() RCU-lockdep checks handle boot-time use Paul E. McKenney
2010-02-28  8:59   ` [tip:core/rcu] rcu: Make " tip-bot for Paul E. McKenney
2010-03-01 19:47     ` Paul Menage
2010-02-28  8:55 ` [PATCH tip/core/rcu 0/2] more lockdep-RCU and RCU_FAST_NO_HZ fixes Ingo Molnar
2010-02-28 16:32   ` Paul E. McKenney [this message]
2010-03-01  8:33     ` [tip:core/rcu] sched, rcu: Fix rcu_dereference() for RCU-lockdep tip-bot for Paul E. McKenney
2010-03-01 12:10     ` [PATCH tip/core/rcu 0/2] more lockdep-RCU and RCU_FAST_NO_HZ fixes Ingo Molnar
2010-03-01 16:08       ` Paul E. McKenney
2010-03-01 17:58         ` Peter Zijlstra
2010-03-01 18:50           ` 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=20100228163218.GD6846@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhltc@us.ibm.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox