Re: Should __FD_SETSIZE still be set to 1024 ?

From: Chris Wedgwood (cw@f00f.org)
Date: Fri Jun 22 2001 - 10:48:49 EST


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.

    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.

    (And let applications define their own limit if there is a need
    for one ?)

Well, squid and friends do this anyhow.

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.

  --cw
-
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/



This archive was generated by hypermail 2b29 : Sat Jun 23 2001 - 21:00:39 EST