Re: PATCH - raise max_anon limit

From: Andrew Morton
Date: Sat Feb 07 2004 - 03:55:57 EST


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.


I'd go with c), personally.
-
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/