|
|
About ::
TODO ::
Blog ::
RSS ::
Old blog ::
Projects ::
GIT ::
Gallery ::
Notes
Thu, 04 Jan 2007
AIO (sub) state machine has been completed.
It is small subsystem, which lives in kernel/kevent/kevent_aio.c
file, which allows to queue and asynchronously invoke
callbacks, which are intended to populate pages into VFS cache, send data
to the destination socket, copy data to/from userspace and so on.
Real working callbacks itself are not implemented yet.
I will only implement three of them - open file by filename,
populate file's pages into VFS cache, send pages to destination socket.
Probably will also add writing page to userspace.
This set will allow to implement aio_sendfile()
as sequence of that callbacks - open file by file path, then populate
its pages into VFS cache in some chunks or one-by-one and eventually
send them to the destination socket.
There is a problem of the order of sending one page and populating
its neighbour though, since having the whole VFS cache filled with
locked pages from one file is not a good idea, but locking is required to
allow sending itself - so page would not be swapped out. But I will
either stop further populating until pages are sent, or will
not firgure this out at all - depending on results from initial
implementation.
Each subtask above - i.e. each callback, is an elementary chunk, which
will be handled by kevent. Completeness of the whole task
will be handled by kevent too.
/devel/kevent/aio :: Link / Comments (0)
Please solve this captcha to be allowed to post (need to reload in a minute): 20 - 58
|