|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Fri, 07 Dec 2007
The return of syslets.
Zach Brown announced
new syslet patchset aimed to simplify and stbilize basic async operations.
Syslets is a mechanims of performing syscalls asynchronously - new thread
is started when syscall is about to block, execution blocks and old thread
is scheduled away to the new one, on behalf of which userspace continues its
execution.
Version 7 of the patchset was built on top of indirect syscall, threadlets,
userspace function execution and async io was removed from the patchset for simplicity,
number of comments and code clarifications were added.
Main goal of the syslets right now is to make fundamental things working right.
Asynchronous IO operations has too long history already - it was implemented
as a state machine in KAIO and kevent AIO,
kernel supports AIO for directIO operations (userspace requires libaio).
Syslet approach was shown to be in some cases much slower than libaio (which is actually
a sync operations for usual files), but it was resolved as unfairness of CFS scheduler,
and (iirc) it was fixed/extended.
My main objection against this is the fact, that when you have thousands of actively
running applications, system starts sucking badly, but if it is possible to reduce maximum
amount of working thread per user to some resonable limit, things will be just fine.
Syslets (and its more friendly threadlets user) were supported by Linus and Ingo Molnar,
so very likely it will be the default way to do asynchronous IO and other operations.
Right now Zach highlighted following problems:
- ring buffer of syslet statuses limitations
ptrace() problems
- stale data (when thread issuing a syslet calls for example
setuid(),
in which case another thread, which actually executes blocked syscall, contains wrong data)
- problems with
sys_clone() and syslets, sys_clone() is actually
a mechanism to create a new thread in syslets, so we get a recursion
All above problems are technically not-impossible for resolution, and I think it is not
that bad to introduce some simple limitations for users, so that majority of async IO qustions
are resolved with this mechanism.
/devel/other :: Link / Comments (0)
Please solve this captcha to be allowed to post (need to reload in a minute): 85 * 94
|