Re: File Descriptors & Linux 2.0

Stephen C. Tweedie (sct@dcs.ed.ac.uk)
Fri, 28 Jun 1996 10:55:18 +0100


Hi,

On Tue, 25 Jun 1996 20:34:54 -0400 (EDT), David Schwartz
<davids@wiznet.net> said:

> Could someone who knows please post exactly what affect changing
> NR_OPEN and NR_FILE does? And is there any way to get Linux 2.0.0 to
> allow more than 256 fd's per process?

First thing: you should never have to change NR_FILE or NR_INODE on
linux-2.0. You can access them dynamically through /proc/sys/file-max
and .../inode-max.

Having more than 256 fds per process is more tricky. You'll need to
change both NR_OPEN in linux/include/linux/fs.h, and __FD_SETSIZE in
linux/include/linux/posix_types.h. Recompiling the kernel with those
constants, and recompiling your critical apps with those headers in
place, _should_ work as far as I can see, but I haven't tested it.

Proper, dynamic kernel support for >256 fds will hopefully get into
2.1.

Cheers,
Stephen.

--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.