lkml.org 
[lkml]   [1996]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfile 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.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.028 / U:3.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site