Messages in this thread |  | | Date | Wed, 8 May 1996 19:23:53 -0400 (EDT) | From | Todd J Derr <> | Subject | file limits in kernel (some answers) |
| |
ok, I finally un-lazied myself and just read the source. now I have some "better" questions ;)
OPEN_MAX looks like some kind of black sheep that's not really used (you can retrieve its value on a sunos, but you can't set it and it's not used anywhere else in the kernel from what I can see)
NR_OPEN is the per-process fd limit, you get EMFILE when you exceed it. A couple things:
1) it shouldn't be defined in bothe linux/fs.h and linux/limits.h. can one or the other be easily removed? 2) linux/posix_types.h implies you can't increase it without breaking select(). Will anything else break? [I've seen the recent thread in comp.unix.internals about libc breaking on fds > 256, but it looks like linux libc is clean (is _fileno in IO_FILE the fd?)]
OPEN_MAX is the kernel's file struct limit, exceeding it brings ENFILE. It looks to me like you can increase this with impunity, and since the structs are dynamically allocated it won't cost much until someone opens a whole lotta files.
Comments?
thanks,
todd.
|  |