[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLU0-SMTP11F8F588EC47CF2C6BAA5896DB0@phx.gbl>
Date: Wed, 23 Feb 2011 10:02:04 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: Steven Rostedt <rostedt@...dmis.org>
CC: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
dipankar@...ibm.com, akpm@...ux-foundation.org,
josh@...htriplett.org, niv@...ibm.com, tglx@...utronix.de,
peterz@...radead.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
eric.dumazet@...il.com, darren@...art.com
Subject: Re: [PATCH RFC tip/core/rcu 05/11] rcu: add comment saying why
DEBUG_OBJECTS_RCU_HEAD depends on PREEMPT.
* Steven Rostedt (rostedt@...dmis.org) wrote:
> On Wed, 2011-02-23 at 08:59 -0500, Mathieu Desnoyers wrote:
>
> > #ifdef CONFIG_PREEMPT
> > /*
> > * Ensure that queued callbacks are all executed.
> > * If we detect that we are nested in a RCU read-side
> > * critical
> > * section, we should simply fail, otherwise we would
> > * deadlock.
> > */
> > if (rcu_preempt_depth() != 0 || preempt_count() != 0 ||
> > irqs_disabled()) {
> > WARN_ON(1);
> > return 0;
> > }
> > rcu_barrier();
> > rcu_barrier_sched();
> > rcu_barrier_bh();
> > debug_object_init(head, &rcuhead_debug_descr);
> > return 1;
> > #else
> > return 0;
> > #endif
> >
> > instead, no ?
>
> BTW, if you do end up doing such a thing...
>
> #ifndef CONFIG_PREEMPT
> return 0;
> #endif
>
> before all that would be much cleaner.
>
> Just make sure any non defined in PREEMPT macros/functions are defined
> as nops in !CONFIG_PREEMPT
Good point, thanks !
Mathieu
>
> -- Steve
>
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists