[RTEMS Project] #4993: Increase FD_SETSIZE to 256

RTEMS trac trac at rtems.org
Tue Feb 20 23:24:35 UTC 2024


#4993: Increase FD_SETSIZE to 256
-------------------------+--------------------------
 Reporter:  Chris Johns  |       Owner:  Chris Johns
     Type:  defect       |      Status:  assigned
 Priority:  highest      |   Milestone:  6.1
Component:  tool/newlib  |     Version:  6
 Severity:  blocker      |  Resolution:
 Keywords:               |  Blocked By:
 Blocking:               |
-------------------------+--------------------------
Description changed by Chris Johns:

Old description:

> The default for `FD_SIZE` in newlib is 64. This is proving to be too
> small for EPICS applications. EPICS limits the number of descriptors
> [https://github.com/epics-base/epics-
> base/blob/7.0/modules/libcom/RTEMS/posix/rtems_config.c#L63 here] for
> RTEMS 6 builds. The comment in EPICS base is:
> {{{
> /* Note: The select() system call can only be used with the first
> FD_SETSIZE
>  *       File Descriptors (newlib default is 64).  Beginning RTEMS 5.1,
> FDs are
>  *       allocated sequentially.  So changing this CONFIGURE parameter
> such
>  *       that CONFIGURE_MAXIMUM_FILE_DESCRIPTORS >= FD_SETSIZE will
> likely
>  *       cause applications making select() calls to fault at some point.
>  *
>  *       IOC core components (libca and RSRV) do not make select() calls.
>  *
>  *       Applications and driver code using poll() or other socket
>  *       multiplexers do not share this limitation.
>  *
>  *       cf. https://github.com/epics-base/epics-base/issues/300
>  */
> }}}
> Increasing `FD_SIZE` to 256 will increase the set but 64 is too small for
> RTEMS and we do not need 1024 that systems like FreeBSD have.

New description:

 The default for `FD_SETSIZE` in newlib is 64. This is proving to be too
 small for EPICS applications. EPICS limits the number of descriptors
 [https://github.com/epics-base/epics-
 base/blob/7.0/modules/libcom/RTEMS/posix/rtems_config.c#L63 here] for
 RTEMS 6 builds. The comment in EPICS base is:
 {{{
 /* Note: The select() system call can only be used with the first
 FD_SETSIZE
  *       File Descriptors (newlib default is 64).  Beginning RTEMS 5.1,
 FDs are
  *       allocated sequentially.  So changing this CONFIGURE parameter
 such
  *       that CONFIGURE_MAXIMUM_FILE_DESCRIPTORS >= FD_SETSIZE will likely
  *       cause applications making select() calls to fault at some point.
  *
  *       IOC core components (libca and RSRV) do not make select() calls.
  *
  *       Applications and driver code using poll() or other socket
  *       multiplexers do not share this limitation.
  *
  *       cf. https://github.com/epics-base/epics-base/issues/300
  */
 }}}
 Increasing `FD_SETSIZE` to 256 will increase the set but 64 is too small
 for RTEMS and we do not need 1024 that systems like FreeBSD have.

--

--
Ticket URL: <http://devel.rtems.org/ticket/4993#comment:3>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list