From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: kernelmail.jms@gmail.com, kulkarni.ravi4@gmail.com
Cc: linux-kernel@vger.kernel.org, cmm@us.ibm.com
Subject: Fw: RCU boot debug patch
Date: Tue, 19 Jul 2011 15:41:42 -0700 [thread overview]
Message-ID: <20110719224142.GT2357@linux.vnet.ibm.com> (raw)
Hello, Julie and Ravi,
Although we arrived at a patch that worked for both of you, we never did
identify exactly which RCU callback (or other issue) that was causing
the problem. It would be good to do this in case there is some other
problem lurking that might bite us in the future. Mingming has therefore
put together the following diagnostic patch which should identify the
callbacks, please see below.
So could you please run this and let us know what you find? There should
at least be a message for artificial_callback().
Thanx, Paul
------------------------------------------------------------------------
A debug patch to verify if there is RCU callbacks before the rcu scheduler is active. Please looking
at the dmesg to see if any message print out related to this other than the artificial one.
Signed_off_by: Mingming Cao <cmm@us.ibm.com>
diff --git a/init/main.c b/init/main.c
index d7211fa..2abc1a5 100644
--- a/init/main.c
+++ b/init/main.c
@@ -452,11 +452,13 @@ static void __init mm_init(void)
pgtable_cache_init();
vmalloc_init();
}
+static void artificial_callback(struct rcu_head *p) {};
asmlinkage void __init start_kernel(void)
{
char * command_line;
extern const struct kernel_param __start___param[], __stop___param[];
+ static struct rcu_head artificial_rcu_head;
smp_setup_processor_id();
@@ -531,6 +533,7 @@ asmlinkage void __init start_kernel(void)
idr_init_cache();
perf_event_init();
rcu_init();
+ call_rcu(&artificial_rcu_head, artificial_callback);
radix_tree_init();
/* init some links before init_ISA_irqs() */
early_irq_init();
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ba06207..60ca927 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1514,6 +1514,11 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
head->func = func;
head->next = NULL;
+ if ((system_state == SYSTEM_BOOTING) && (!rcu_scheduler_active))
+ printk(KERN_ALERT "RCU scheduler is not active yet, "
+ "Calling _call_rcu() with this function %pf\n",
+ func);
+
smp_mb(); /* Ensure RCU update seen before callback registry. */
/*
next reply other threads:[~2011-07-19 22:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 22:41 Paul E. McKenney [this message]
2011-07-20 5:27 ` Fw: RCU boot debug patch RKK
2011-07-20 14:59 ` Paul E. McKenney
2011-07-20 15:53 ` RKK
2011-07-20 16:09 ` Paul E. McKenney
2011-07-21 5:39 ` RKK
2011-07-22 2:29 ` Paul E. McKenney
2011-07-27 21:47 ` kernelmail.jms
2011-07-27 23:56 ` Kyle Moffett
2011-07-28 0:02 ` Paul E. McKenney
2011-07-28 19:56 ` Julie Sullivan
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=20110719224142.GT2357@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=cmm@us.ibm.com \
--cc=kernelmail.jms@gmail.com \
--cc=kulkarni.ravi4@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox