Re: PATCH - raise max_anon limit

From: viro
Date: Sat Feb 07 2004 - 04:49:54 EST


On Sat, Feb 07, 2004 at 12:55:05AM -0800, Andrew Morton wrote:
> Tim Hockin <thockin@xxxxxxx> wrote:
> >
> > Attached is a patch to raise the limit of anonymous block devices. The
> > sysctl allows the admin to set the order of pages allocated for the unnamed
> > bitmap from 1 page to the full MINORBITS limit.
>
> It would be better to lose the sysctl and do it all dynamically.
>
> Options are:
>
> a) realloc the bitmap when it fills up
>
> Simple, a bit crufty, doesn't release memory.
>
> b) lib/radix-tree.c
>
> Each entry in the radix tree can be a bitmap (radix-tree.c should
> have been defined to store unsigned longs, not void*'s. Oh well), so
> you get good space utilisation, but finding a new entry will take ten or
> so lines of code.
>
> c) lib/idr.c
>
> Worst space utilisation, but simplest code.

d) grab a couple of pages and be done with that. That gives us 64Kbits.

e) grab max(1/8000 of entire memory, 128Kb). That will guarantee that
we run out of memory or minors before we fill the bitmap.

PS: psu.edu address is still valid, but I rarely read that mailbox...
-
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/