From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: kordex - <kordex@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Badness at kernel/rcutree.c:1228
Date: Tue, 8 Dec 2009 18:08:34 -0800 [thread overview]
Message-ID: <20091209020834.GK6779@linux.vnet.ibm.com> (raw)
In-Reply-To: <8b8dd87a0912081741q24177e1bt3f624eded1590ca6@mail.gmail.com>
On Wed, Dec 09, 2009 at 03:41:00AM +0200, kordex - wrote:
> Hey,
>
> I put the debug function under init/main.c after rcu_init(); but there
> is no output on dmesg which means that it receives zero value.
>
> Full dmesg: http://xnet.fi/opt/apps/lkml-2.6.32-vanilla.dmesg.rcu-init.txt
Could you please send the patch you applied to, as you said, put the
debug function under init/main.c after rcu_init()?
Thanx, Paul
> --Mikko Kortelainen
>
> 2009/12/8 Paul E. McKenney <paulmck@linux.vnet.ibm.com>:
> > On Tue, Dec 08, 2009 at 11:22:07AM -0800, Paul E. McKenney wrote:
> >> At this point, I must defer to those more skilled than I at diagnosing
> >> early-boot problems.
> >
> > Well, that is silly on my part -- the problem seems to appear late in
> > boot, and you had no problem capturing that portion of the boot log.
> >
> > So please see below for a patch providing a rcu_check_beenonline()
> > function that, when called after rcu_init(), returns non-zero if the
> > beenonline fields have become corrupted. So put calls of the form:
> >
> > WARN_ON_ONCE(rcu_check_beenonline());
> >
> > in the initialization code path preceding the problem. Either #include
> > rcupdate.h or explicitly declare the function as appropriate.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > ---
> >
> > diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
> > index 9642c6b..190a687 100644
> > --- a/include/linux/rcutree.h
> > +++ b/include/linux/rcutree.h
> > @@ -39,6 +39,8 @@ extern int rcu_cpu_notify(struct notifier_block *self,
> > extern int rcu_needs_cpu(int cpu);
> > extern int rcu_expedited_torture_stats(char *page);
> >
> > +extern int rcu_check_beenonline(void);
> > +
> > #ifdef CONFIG_TREE_PREEMPT_RCU
> >
> > extern void __rcu_read_lock(void);
> > diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> > index 207125b..27d3722 100644
> > --- a/kernel/rcutree.c
> > +++ b/kernel/rcutree.c
> > @@ -77,6 +77,17 @@ DEFINE_PER_CPU(struct rcu_data, rcu_sched_data);
> > struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh_state);
> > DEFINE_PER_CPU(struct rcu_data, rcu_bh_data);
> >
> > +/*
> > + * Ad-hoc diagnostic function, for use only after rcu_init() has
> > + * returned. Assumes that the boot CPU is CPU 0. Assumes that
> > + * the kernel has been built with CONFIG_TREE_RCU. Not for inclusion.
> > + * Usage: "WARN_ON_ONCE(rcu_check_beenonline());"
> > + */
> > +int rcu_check_beenonline(void)
> > +{
> > + return !per_cpu(rcu_sched_data, 0).beenonline ||
> > + !per_cpu(rcu_bh_data, 0).beenonline;
> > +}
> >
> > /*
> > * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s
> >
next prev parent reply other threads:[~2009-12-09 2:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 18:58 Badness at kernel/rcutree.c:1228 kordex -
2009-12-08 0:08 ` Paul E. McKenney
[not found] ` <8b8dd87a0912080352j36fa24bbvf301a4101d80e434@mail.gmail.com>
2009-12-08 11:54 ` kordex -
2009-12-08 15:35 ` Paul E. McKenney
[not found] ` <8b8dd87a0912080924q3890ea8o23f6d1cfab37e306@mail.gmail.com>
[not found] ` <20091208192207.GC6779@linux.vnet.ibm.com>
[not found] ` <20091208200657.GA12990@linux.vnet.ibm.com>
2009-12-09 1:41 ` kordex -
2009-12-09 2:08 ` Paul E. McKenney [this message]
[not found] ` <8b8dd87a0912090115i3c4877b8s2e47f84f9c66ff7@mail.gmail.com>
[not found] ` <20091209140334.GB6812@linux.vnet.ibm.com>
[not found] ` <8b8dd87a0912090657y2702ecd7x5f41beb3ab785ccf@mail.gmail.com>
[not found] ` <20091209165304.GB6938@linux.vnet.ibm.com>
[not found] ` <8b8dd87a0912090935s75de7011s905c3007311a6b6b@mail.gmail.com>
[not found] ` <20091209183042.GD6938@linux.vnet.ibm.com>
2009-12-09 18:36 ` kordex -
2009-12-09 19:18 ` Paul E. McKenney
[not found] ` <8b8dd87a0912091309m21b8e560pd68e47e7ec38f097@mail.gmail.com>
[not found] ` <20091210024809.GJ6938@linux.vnet.ibm.com>
2009-12-10 14:24 ` kordex -
2009-12-10 19:32 ` 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=20091209020834.GK6779@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=kordex@gmail.com \
--cc=linux-kernel@vger.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 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.