[erlang-questions] clipping of max# of file descriptors by ertswhen kernel poll is enabled

Rickard Green S <>
Mon Aug 25 15:14:18 CEST 2008


Matthew's answer is correct. If we need to fall back on select() on a filedescriptor that is larger than select() can handle, your modification wont work.

BR,
Rickard Green, Erlang/OTP, Ericsson AB.


-----Ursprungligt meddelande-----
Från:  genom Joel Reymont
Skickat: lö 2008-08-23 10:32
Till: Matthew Dempsky
Kopia: Erlang Questions
Ämne: Re: [erlang-questions] clipping of max# of file descriptors by ertswhen kernel poll is enabled
 
Just to make sure I delivered my point across...

erl_poll.c will be compiled twice, once with ERTS_POLL_USE_KERNEL_POLL  
and once without, even when kernel poll is present and the build  
detects it.

ERTS should not be clipping max_fds when ERTS_POLL_USE_KERNEL_POLL is  
defined, not in the "kernel poll" version of erl_poll.c.

To make sure there's no clipping when kernel poll is present and  
detected, the code should look like this:

#if ERTS_POLL_USE_SELECT && defined(FD_SETSIZE) && ! 
ERTS_POLL_USE_KERNEL_POLL
    if (max_fds > FD_SETSIZE)
        max_fds = FD_SETSIZE;
#endif

I tested it by running erl +Ktrue and erl +Kfalse and it works. The  
original version clips max_fds regardless of kernel poll.

	Thanks, Joel

--
wagerlabs.com





_______________________________________________
erlang-questions mailing list

http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list