Re: [PATCH] 1/1: Device-Mapper: Remove 1024 devices limitation

From: Andrew Morton
Date: Thu Jul 01 2004 - 22:32:53 EST


Kevin Corry <kevcorry@xxxxxxxxxx> wrote:
>
> > Did you consider going to a different data structure altogether?
> > lib/radix-tree.c and lib/idr.c provide appropriate ones.
>
> The idr stuff looks promising at first glance. I'll take a better look at it
> tomorrow and see if we can switch from a bit-set to one of these data
> structures.

Yes, idr is the one to use. That linear search you have in there becomes
logarithmic. Will speed up the registration of 100,000 minors no end ;)

-
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/