You keep on comparing "inefficient code together with 'select'" to
your "ideal code using your new poll".
If you need fast code, you need to do things as fast as possible.
The 5120 limit on the number of FDs in select is easily overcome by
allowing the code to allocate more pages if NR_OPEN is larger than
5120. As nobody has needed this, this is not yet implemented. I just
did it for 2.0.30, but it seems you're talking 2.1.5x.