lkml.org 
[lkml]   [2010]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 10/16] rcu: slim down rcutiny by removing rcu_scheduler_active and friends
On Tue, Apr 20, 2010 at 11:15:08AM +0100, David Howells wrote:
> Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
>
> > +void rcu_scheduler_starting(void)
> > +{
> > + WARN_ON(nr_context_switches() > 0);
> > + rcu_scheduler_active = 1;
> > +}
>
> Since rcu_scheduler_active is a global variable, does it make sense to make
> this an inline function in the header file?

Unfortunately, nr_context_switches() put me in #include hell when I
tried that.

> It looks decidedly odd in its own include file as you've done it. Wouldn't
> the right way to do this be to split it into its own .c file and conditionally
> compile it in the Makefile?

It will soon have lots of company, as this is where the plugins
for CONFIG_TINY_PREEMPT_RCU will go. In other words, kernel/rcutiny.c
will have the same relationship to kernel/rcutiny_plugin.h that
kernel/rcutree.c has with kernel/rcutree_plugin.h.

Thanx, Paul


\
 
 \ /
  Last update: 2010-04-20 21:21    [W:0.147 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site