On 19-Sep-2001 Christopher K. St. John wrote:> Davide Libenzi wrote:>> >> > - check new_socket_fd for readable, writable, and>> > error. if any true, then add new event to>> > event queue, as if the state had changed.>> >> No it does't check. It's not needed for how it works.>> > > Yes, I see that it currently works that way. I'm> suggesting that it's a needlessly awkward way to work.> It also results in thousands of spurious syscalls a> second as servers are forced to double check there> isn't i/o to be done.

Again :

1) select()/poll();2) recv()/send();

vs :

1) if (recv()/send() == FAIL)2) ioctl(EP_POLL);

When there's no data/tx buffer full these will result in 2 syscalls whileif data is available/tx buffer ok the first method will result in 2 syscallswhile the second will never call the ioctl(). It looks very linear to me, with select()/poll() you're asking for a state whilewith /dev/epoll you're asking for a state change.