Re: [tip:sched/urgent] sched: Teach might_sleep() about preemptible RCU

Frederic Weisbecker
2009-12-16T18:57:51Z

On Wed, Dec 16, 2009 at 07:30:20AM -0800, Paul E. McKenney wrote:
> On Wed, Dec 16, 2009 at 03:25:36PM +0100, Ingo Molnar wrote:
> >
> > * tip-bot for Frederic Weisbecker <fweisbec@gmail.com> wrote:
> >
> > > Commit-ID: ba1b1cbcc9b458c4b9ebb28c9cf6a2ccf64ba1cd
> > > Gitweb: http://git.kernel.org/tip/ba1b1cbcc9b458c4b9ebb28c9cf6a2ccf64ba1cd
> > > Author: Frederic Weisbecker <fweisbec@gmail.com>
> > > AuthorDate: Mon, 14 Dec 2009 23:44:32 +0100
> > > Committer: Ingo Molnar <mingo@elte.hu>
> > > CommitDate: Wed, 16 Dec 2009 08:43:16 +0100
> > >
> > > sched: Teach might_sleep() about preemptible RCU
> >
> > Causes a build failure, so skipped this patch for now:
> >
> > kernel/sched.c:9661: error: implicit declaration of function 'rcu_preempt_depth'
>
> I guess my testing missed something. :-/ Could you please send the
> .config file that caused this?
>
> Thanx, Paul

Looks like the problem is here:

rcupdate.h:

#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
#include <linux/rcutree.h>
#elif defined(CONFIG_TINY_RCU)
#include <linux/rcutiny.h>

I guess it barfs in rcutiny configs.

I should define these helpers in rcupdate.