ウィキペディアは言う
O(n)で動作する古いシステムコールとは異なり、epollはO(1)で動作します[2])。
http://en.wikipedia.org/wiki/Epoll
ただし、Linux-2.6.38のfs / eventpoll.cのソースコードは、O(logN)を持つ検索用のRBツリーで実装されているようです。
/*
* Search the file inside the eventpoll tree. The RB tree operations
* are protected by the "mtx" mutex, and ep_find() must be called with
* "mtx" held.
*/
static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd)
{
実際、epoll()の複雑さはO(1)であると言っているmanページは見当たりませんでした。なぜそれはO(1)として知られているのですか?