Hi all,
it has been coming up in at least two contexts recently: Select is showing up a lot in system-level profiles particularly on osmo-bts.
This is hardly surprising, as select() is not particularly known for efficiency. It was used back in 2008 for the *BSC*, in a context where we were talking about 1-10 BTS with each no more than 1-2 TRX. Now we are using the same osmo_fd abstraction on the BTS, where the number of messages per second is much higher, particularly in osmo-bts-trx with its TRXD protocol, and particularly with higher number of TRX per BTS.
There is an older feature request to introduce epoll support in https://osmocom.org/issues/1579 but unfortunately nobody has been finding the resources and/or time to implement it.
Meanwhile, 1.5 years ago, the Linux kernel received a new sub-system called io_uring, which I would personally love to support. Here are some pointers for those who are interested: https://lwn.net/Articles/776703/ https://kernel.dk/io_uring.pdf https://lwn.net/Kernel/Index/#io_uring
As unfortunately not everyone is using half-way recent kernels, we will likely have to fall back to epoll or something like that.
Regards, Harald