Re: lots and lots of disks again

Andrew Morton
2004-02-11T21:27:05Z

Kurt Garloff <garloff@suse.de> wrote:
>
> Hi Andrew,
>
> On Tue, Feb 10, 2004 at 10:26:03AM -0800, Andrew Morton wrote:
> > Kurt Garloff <garloff@suse.de> wrote:
> > >
> > > Since when is 4k huge?
> > > Sorry, I don't see any benefit in adding complexity to avoid a 4k array.
> >
> > Well yes, but we do have lib/idr.c which I believe does what you need. It
> > is simple to use.
>
> It can store a pointer per ID. One that I don't need, unless I overlook
> some possibility to put an already existing pointer in there.
>
> If we really allocate thousands of disks, the overhead of this solution
> will be higher than the bitmap, I'm afraid.

Four (or eight) bytes per disk! I perceive a lack of perspecitve here ;)

I'd trade clarity of implementation for that. (As well as, possibly,
reduced memory use on low-end machines).