Re: [PATCH] /dev/epoll update ...

Davide Libenzi (davidel@xmailserver.org)
Wed, 19 Sep 2001 15:11:47 -0700 (PDT)


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 while
if data is available/tx buffer ok the first method will result in 2 syscalls
while the second will never call the ioctl().
It looks very linear to me, with select()/poll() you're asking for a state while
with /dev/epoll you're asking for a state change.

- Davide

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/