All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: akpm@linux-foundation.org, mingo@elte.hu,
	linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com,
	dipankar@in.ibm.com, 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, eric.dumazet@gmail.com, adobriyan@gmail.com,
	davem@davemloft.net
Subject: Re: [patch 0/5] rcu head debugobjects
Date: Wed, 21 Apr 2010 21:20:49 -0400	[thread overview]
Message-ID: <20100422012049.GA32400@Krystal> (raw)
In-Reply-To: <20100421173145.GA6966@linux.vnet.ibm.com>

* Paul E. McKenney (paulmck@linux.vnet.ibm.com) wrote:
> On Sat, Apr 17, 2010 at 05:48:49PM -0700, Paul E. McKenney wrote:
> > On Sat, Apr 17, 2010 at 08:48:37AM -0400, Mathieu Desnoyers wrote:
> > > Here is a repost of the rcu head debugobjects patchset, with updated changelogs.
> > > 
> > > Paul, this would be ready to be integrated with the RCU patches.
> > 
> > Thank you, Mathieu, queued up for 2.6.35!
> 
> And testing got me the following debugobjects splat, which baffles me.
> My first thought was that one of the synchronize_rcu() variants was
> missing the init_rcu_head_on_stack(), but not so.  Then I started
> looking through the debugobjects code, and found the following:
> 
> 	static void debug_object_is_on_stack(void *addr, int onstack)
> 	{
> 		int is_on_stack;
> 		static int limit;
> 
> 		if (limit > 4)
> 			return;
> 
> This really confuses me.  We are using a static variable, but as
> near as I can tell, it is being guarded by a per-bucket lock:
> 
> 	raw_spin_lock_irqsave(&db->lock, flags);
> 
> If I understand correctly, this means that multiple CPUs might be
> concurrently updating the static variable "limit", which might in
> turn be causing the splat below.
> 
> Or am I missing something?

This "limit" static variable is really only a printk suppressor: it stops the
printk warning output after approximately 5 occurences (modulo racy increments).
But normally, it should not _cause_ a splat if there ain't any in the first
place.

Will send the fix in a following email.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2010-04-22  1:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-17 12:48 [patch 0/5] rcu head debugobjects Mathieu Desnoyers
2010-04-17 12:48 ` [patch 1/5] Debugobjects transition check Mathieu Desnoyers
2010-04-17 12:48 ` [patch 2/5] rcu head introduce rcu head init on stack Mathieu Desnoyers
2010-04-17 12:48 ` [patch 3/5] remove all rcu head initializations, except on_stack initializations Mathieu Desnoyers
2010-04-17 12:48 ` [patch 4/5] rcu head remove init Mathieu Desnoyers
2010-04-17 12:48 ` [patch 5/5] tree/tiny rcu: Add debug RCU head objects (v5) Mathieu Desnoyers
2010-04-19  1:17   ` Lai Jiangshan
2010-04-19 13:34     ` Paul E. McKenney
2010-04-18  0:48 ` [patch 0/5] rcu head debugobjects Paul E. McKenney
2010-04-21 17:31   ` Paul E. McKenney
2010-04-22  1:20     ` Mathieu Desnoyers [this message]
2010-04-22  1:23     ` [PATCH] rcu fix rcu head init on stack in rcutree_plugin.h Mathieu Desnoyers
2010-04-22 22:52       ` 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=20100422012049.GA32400@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhltc@us.ibm.com \
    --cc=eric.dumazet@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=niv@us.ibm.com \
    --cc=paulmck@linux.vnet.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 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.