#%include "default.mgp" %tab 1 size 5, vgap 40, prefix " ", icon box "green" 50 %tab 2 size 5, vgap 40, prefix " ", icon arc "yellow" 50 %tab 3 size 5, vgap 40, prefix " ", icon delta3 "white" 40 %%%%%%%%%%%%% %page %tfont "/usr/share/fonts/default/TrueType/timr____.ttf" %fore "white" %center Discussion: Asynchronous IO for Linux in 2.5 %fore "blue" %size 6 Benjamin LaHaise %size 4 bcrl@redhat.com %left %size 6 %%%%%%%%%%%% %page %fore "white" Discussion Goals %fore "skyblue" bits & state of merge implementation experiences api fun how do we proceed? %%%%%%%%%%%% %page %fore "white" Bits %fore "skyblue" wait queue function callbacks (merged) new syscalls (fs/aio.c -- not yet merged) work to dos (not merged, needs to switch to tasklets?) kvec (not merged, questionable direction?) generic file read / write operations (not yet merged, rewrite?) non-fast path: drivers (not done yet, how?) %% io_setup(nr_reqs, *ctx) %% io_destroy(ctx) %% io_submit(ctx, nr, **iocbs) %% io_cancel2(ctx, *iocb, *event) %% io_getevents(ctx, nr, *events, *timeout) %% %%%%%%%%%%%% %page %fore "white" Implementation Experiences %fore "skyblue" syscalls worked well tqueues for worktodos were a Bad Idea (tm) refcounting iocbs is not optional code duplication in aio_read/write operations kvecs / kiobufs suck for small and large ios fast paths are important new_read/write doesn't work explicitly async operations can be large %%%%%%%%%%%% %page %fore "white" API fun %fore "skyblue" file_operations ssize_t aio_read(struct kiocb *, char *, size_t, loff_t); ssize_t aio_write(struct kiocb *, const char *, size_t, loff_t); int aio_fsync(struct kiocb *, int datasync); address_space_operations read/write/sync_ page read/write pages direct_IO prepare/commit_write set_page_dirty mmm, code duplication %%%%%%%%%%%% %page %fore "white" How do we proceed? %fore "skyblue" a true commitment to aio support will impact the entire kernel how far should we go? should support for unimplemented operations be in user or kernel space?