Re: [patch 0/6] rcu head debugobjects

From: Mathieu Desnoyers
Date: Mon Mar 29 2010 - 11:04:37 EST


* Paul E. McKenney (paulmck@xxxxxxxxxxxxxxxxxx) wrote:
> On Mon, Mar 29, 2010 at 09:39:33AM -0400, Mathieu Desnoyers wrote:
> > Hi Paul,
> >
> > Thinking about the rcu head init topic, we might be able to drop the
> > init_rcu_head() initializer. The idea is the following:
> >
> > - We need init_rcu_head_on_stack()/destroy_rcu_head_on_stack().
> > - call_rcu() populates the rcu_head and normally does not care about it being
> > pre-initialized.
> > - The activation fixup can detect if a non-initialized rcu head is being
> > activated and just perform the fixup without complaining.
> > - If we have two call_rcu() in a row in the same GP on the same rcu_head, the
> > activation check will detect it.
> >
> > So either we remove all the init_rcu_head(), as was originally proposed, or we
> > use one that is a no-op on !DEBUG configs and initialize the object with DEBUG
> > configs.
> >
> > That removes the dependency on object_is_static().
>
> If I understand correctly, this does sound good. Here is what I think
> you are proposing:
>
> o call_rcu() and friends only complain if handed an rcu_head
> structure that is still queued awaiting a grace period.
> They don't care otherwise.
>
> o rcu_do_batch() complains unless the rcu_head structure has
> most recently been enqueued by call_rcu() or one if its friends.
>
> Did I get it right?

Exactly.

Thanks,

Mathieu

>
> Thanx, Paul

--
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/