Re: variable fd array patch for 2.1.90

Savochkin Andrey Vladimirovich (saw@msu.ru)
Fri, 27 Mar 1998 15:37:44 +0300


On Thu, Mar 26, 1998 at 02:41:39PM -0500, Bill Hawes wrote:
> The attached patch provides for variable-sized fd arrays, automatically
> expanding from a small default (32 files) to the full 1024 when needed. This
> results in a significant savings of non-pageable kernel memory (about 35 pages
> just for the system tasks), and should significantly speed up process forking
> when fewer than 32 files are used.

Cool!

>
> The patch adds an FDSize: entry to the /proc/pid/status output so you can
> monitor which tasks are using more files. (As discussed previously on the list
> here, the bash shell opens fd 255 and therefore requires a full fd array.)
>
> The patch is against 2.1.90, but you'll need the changes in 2.1.91 pre-2 to test
> the code. Comments and suggestions welcome ...

If I understand you right now a process can have either 32 allocated
fd entries or 1024 ones. Is it reasonable to implement increasing
the array to 256 entries at first and
later to the full size if needs?

Just my $0.02

Cheers
Andrey V.
Savochkin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu