Messages in this thread | | | Date | Fri, 22 Jun 2001 18:25:41 +0200 (CEST) | From | Dag Wieers <> | Subject | Re: Should __FD_SETSIZE still be set to 1024 ? |
| |
On Sat, 23 Jun 2001, Chris Wedgwood wrote:
> On Fri, Jun 22, 2001 at 04:59:36PM +0200, Dag Wieers wrote: > > Is there a reason for __FD_SETSIZE to be 1024 in > linux/posix_types.h and gnu/types.h ? > Why can't we increase this number by default ? > > It might break stuff, like things that link with code that assumes it > is only 1024.
So if someone wants to increase it for an application he needs to be sure that everything that it is linked with is compiled with a similar __FD_SETSIZE ?
Why can you safely increase the value in Squid then ?
> Shouldn't it be set to the real limit of the kernel ? > > Nah... the kernel limit is 1024^2 --- you don't want to use select > anywhere near that.
Yes, but still, why 1024 ?
> (And let applications define their own limit if there is a need > for one ?) > > Well, squid and friends do this anyhow.
No, squid takes the lowest of both (FD_SETSIZE and SQUID_MAXFD) in main.c. And the Squid configure gets the FD_SETSIZE value from linux/posix_types.h ;(
> Not only that, using a greatly increased value should be a run-time > decision, lest you want your code to break on early 2.2.x kernels and > before.
I'm still not convinced that something might break, since everybody advices to increase __FD_SETSIZE before compiling Squid.
And if linux/posix_types.h defines the limit of open file descriptors of the system, 1024 is (IMO) a wrong number. But then again, nobody bothered to change it...
Thanks for your respons.
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- «Onder voorbehoud van hetgeen niet uitdrukkelijk wordt erkend»
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |