Re: [PATCH tip/core/rcu 8/9] idr: apply lockdep-based diagnosticsto rcu_dereference() uses

From: Paul E. McKenney
Date: Mon Jan 18 2010 - 19:57:01 EST


On Mon, Jan 18, 2010 at 03:36:04PM -0800, Josh Triplett wrote:
> On Thu, Jan 14, 2010 at 05:02:45PM -0800, Paul E. McKenney wrote:
> > From: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> >
> > Because idr can be used with any of a number of locks or with any
> > flavor of RCU, just disable the lockdep-based diagnostics. If idr
> > needs diagnostics, the check expression will need to be passed into
> > the relevant idr primitives as an additional argument.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
>
> The subject line of this patch seems wrong. Like the preceding patches
> for radix tree and list operations, this *disables* the checking by
> using _raw.

It does indeed use _raw. If we start having enough issues with these
interfaces, this will need to change. At the moment, the obvious change
is to provide multiple interfaces as was done for rcu_dereference().
For example, idr_find(), idr_find_bh(), idr_find_sched(), idr_find_srcu(),
idr_find_rcu(), and idr_find_check().

Probably only a few of these are actually in use, but even so, I decided
to see how rcu_dereference() turned out before pushing up to the
higher-level APIs. My guess would be that the list APIs would be most
pressing, but we will see. ;-)

Thanx, Paul
--
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/