|
|
About ::
TODO ::
Blog ::
RSS ::
Old blog ::
Projects ::
GIT ::
Gallery ::
Notes
Fri, 03 Nov 2006
Kevent roadmap.
I plan to implement following features in kevent in order
as they are presented:
- new ring buffer implementation.
It will be exactly like existing one, except that it will work
with provided by userspace using special syscall.
This will allow to make all kevent syscalls as so called 'cancellation points' by glibc,
i.e. when thread has been cancelled in kevent syscall, thread can safely removed and no events
will be lost, since each syscall will copy event into special ring buffer, accessible from other threads
or even processes (if shared memory is used).
Actually it is already possible, and it was there from the beginning of the kevent - one can
provide shared memory (or memory used as shared buffer between threads) to kevent_get_events(),
but in this case userspace should manage indexes (offsets where to put new ready events) by itself.
- wake-up-one-thread flag. When several threads wait on the same kevent queue and requested the same event,
for example 'wake me up when new client has connected, so I could call
accept()',
then all threads will be awakened when new client has connected, but only one of them can process the data.
This problem is known as 'thundering nerd problem'. With new flag it will be possible to mark
some events, so only threads requested to be in the thundering nerd (i.e. those threads which
have not set the flag on given event) would be awakened when event is ready.
- FIFO read/write notifications.
- userspace notifications. Userspace will be able to register a special event, which can be marked as ready
by some other thread. In theory it is just usual pipe between users, so it is possible (and likely) that I will
not do it.
- signal notifications. Unlikely to be implemented by me - I already have huge experience in 'working'
with signal/rt-signal gurus, so additional project will likely mar my karma even more.
First one will be available in the new release (I expect to start working on it either after confirmation
from other developers that our private discussion and my conclusions are correct or after some timeout,
likely this weekend). I will think some more on second point (wake-up-one-thread flag), and if
things will not have major problems, will try to implement this too.
I schedule next release for the next week, likely it's start, but it is possible that it will take much longer.
/devel/kevent :: Link / Comments ()
|