[lkml]   [2003]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: debate on 700 threads vs asynchronous code
Mark Hahn wrote:
>>>>>does epoll provide a thunk (callback and state variable) as well as the
>>>>>IO completion status?
>>>>No. It provides an event record containing a user-defined state pointer
>>>>plus the IO readiness status change (different from IO completion status).
>>>>But that's what you need; you can do the call yourself.
>>>well, that means another syscall, which makes a footprint claim kind of moot,
>>What syscall? You call sys_epoll once for every thousand events or so,
>>then you call your handler, which does a write or whatever. No
>>extra syscall.
> before a client can be sent the next chunk, the IO status of the last
> chunk must be tested. with the simple blocking, thread-per-client approach,
> this happens automaticaly (write returns the number of bytes written).
> with epoll, don't you have to do a syscall to query the status of
> the just-completed IO?

Nope. Just go ahead and write. (Same as with poll(), except that
with epoll, you only get notified once.) Any errors are reported
immediately by write(), so there's no more status to get.
- Dan

Dan Kegel

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.036 / U:3.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site