Re: [PATCH 2.6.23-mm1] Change the ida/idr_pre_get() return value to follow the kernel convention

Andrew Morton
2007-10-31T10:15:38Z

On Wed, 31 Oct 2007 11:06:32 +0100 Pierre Peiffer <pierre.peiffer@bull.net> wrote:

> >
> > Storage classes which need to allcoate memory at insertion time are hard:
> > radix_tree_preload() gets it right in terms of robustness, but it's an
> > awful lot of fuss.
> >
> > IDR gets it all wrong and compounds the problem by implementing internal
> > locking. It shouldn't have done that: storage code like this should use
> > only caller-provided locking.
>
> Ok, but for that, I prefer to let the IDR maintainers see what they can do,
> because I'm not familiar at all with the IDR implementation and can not focus on
> that now.

Jim isn't very active nowadays

> So do you think that just providing a new API (something like
> idr_pre_allocate(), as you say above) would be better than nothing ?
> Or we just leave the code as is for now ?

I guess we can leave it as-is if the present interface isn't actually
causing you guys any problems.