-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
select()
portability and FD limits on RTEMS
#300
Comments
The only usage of
Another module I've looked at is asyn, which only uses Searching around in epics-modules, I find several directly calling I'm not sure if any of these are, or could be, run on RTEMS. Nor have I investigated whether they may use alternatives. ( fyi. @MarkRivers @kasemir @coretl |
dxpSITORO and mca use select() in vendor libraries for discovering devices on the network. These could possibly run on RTEMS but it seems unlikely, since they run on Linux and Windows. measComp uses select() in test programs to test for keyboard input on Linux. Can not be used on RTEMS, vendor library only supported on Linux and Windows. I think tpmac is obsolete, and replaced by pmac https://github.com/dls-controls/pmac. In that module select() seems to be called only in pmacSerial.c which only runs on vxWorks. |
Yes, tpmac has been replaced by pmac, although I think our version of vxWorks at DLS is too old to compile it. @gilesknap I think our plan is to run RTEMS on the MVME5500 boards that talk to the VME PMACs, would this select issue affect us when doing this? |
@coretl it looks like this might affect us. I expect that pmacAsynVMEPortSrc is going to need reviewing for RTEMS anyway though. |
I've updated the doc. comment in It is also worth noting that |
We might be approaching that limit, but I don't know if we've ever crossed it. @peteleicester do you know if we've ever exceeded this number? |
@coretl @peteleicester One symptom of exceeding FD_SETSIZE with ca-gateway would be seeing |
I dont recall seing this error in any of our gateway logs to date. |
There might be some code in the gateway to prevent it from trying to use more FDs than are available. I know Ken Evans added a feature that reserves an FD so it could still open a file (maybe for a logfile rotation) when there were too many FDs in use, but I don't remember any details. I know that APS had to configure the gateway processes to use a smaller than default thread stack size on a 32-bit OS because the number of threads created for all our client-side connections was more than could fit in the virtual address space. |
recsync uses |
I am in the processing of changing the The RTEMS ticket with the patch is https://devel.rtems.org/ticket/4993 |
From https://docs.rtems.org/branches/master/user/migration/v4_11-to-v5.html
This is the reason that the configured maximum number of file descriptors has been reduced from 150 (RTEMS <= 4.x) to 64 (RTEMS >= 5.x)
epics-base/modules/libcom/RTEMS/score/rtems_config.c
Line 36 in 0f8ea3a
epics-base/modules/libcom/RTEMS/posix/rtems_config.c
Line 64 in 0f8ea3a
To be clear this reduction is made out of an abundance of caution.
FD_SETSIZE
effects mainly (only?) theselect()
function. Applications/sites which don't callselect()
may safely raise this limit.At present, IOC core and the PVA modules do not use
select()
.The only usage of
select()
in Base is in thefdManager
code, which is mainly encountered in the PCAS and ca-gateway code.The text was updated successfully, but these errors were encountered: