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

Paul E. McKenney
2010-01-19T00:56:55Z

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@linux.vnet.ibm.com>
> >
> > 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@linux.vnet.ibm.com>
>
> 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