|
|
About ::
TODO ::
Blog ::
RSS ::
Old blog ::
Projects ::
GIT ::
Gallery ::
Notes
Sat, 18 Nov 2006
True asynchronous IO.
All existing AIO - both mainline and kevent based lack major feature -
they are not fully asyncronous, i.e. they require synchronous set of steps,
some of which can be asynchronous. For example
aio_sendfile() requires
open of the file descriptor and only then aio_sendfile() call. The same applies
to mainline AIO and read/write calls.
My idea is to create real asyncronous IO - i.e. some entity which will describe
set of tasks which should be performed asynchronously (from user point of view,
although read and write obviously must be done after open and before close),
for example syscall which gets as parameter destination socket and local filename
(with optional offset and length fields), which will asynchronously from user point of view
open a file and transfer requested part to the destination socket and then return opened
file descriptor (or it can be closed if requested). Similar mechanism can be done for
read/write calls.
This approach as long as asynchronous IO at all requires access to user memory from
kernels thread or even interrupt handler (that is where kevent based AIO completes
its requests) - it can be done in the way similar to how existing
kevent ring buffer
implementation and also can use dedicated kernel thread or workqueue to copy data into process
memory.
It is very interesting task and should greatly speed up workloads of busy web/ftp and other servers,
which can work with a huge number of files and huge number of clients.
I've put it into TODO list.
Someone, please stop the time for several days, so I could create some really good things for the universe.
/devel/other :: Link / Comments ()
|