segment tree & epoll