From: Stephen D. <sd...@gm...> - 2006-01-02 16:23:31
|
On 1/2/06, Zoran Vasiljevic <zv...@ar...> wrote: > > Am 02.01.2006 um 08:36 schrieb Stephen Deasey: > > > On 12/31/05, Zoran Vasiljevic <zv...@ar...> wrote: > >> > >> Am 31.12.2005 um 20:12 schrieb Vlad Seryakov: > >> > >>> aio_read/aio_write system calls look like supported ubnder Linux > >>> > >> > >> yes. most of modern os's support some kind of kaio. > >> I have checked solaris, linux and darwin and all do. > > > > > > Hmm, not sure about that... > > > > Linux aio_read() is implemented within glibc with via threads. The > > 2.6 Linux epoll() is great for socket file descriptors, but doesn't > > work with files. Same for realtime signals in 2.4. The kernel stuff, > > io_submit() etc. only works on files opened with O_DIRECT, i.e. no > > file system buffering. io_*() via libaio, and epoll() are not > > portable. > > > > The BSDs (FreeBSD first, others later) have kqueue, and so does Mac/OS > > from 10.3 on, but again this is not portable. This didn't work with > > threads in the past. Don't know if/when that got fixed... > > > > Solaris 10 has some brand new port_*() calls. Again, not portable. > > Not sure how aio_read() etc. are implemented on older versions of > > Solaris. > > > > I think Windows has pretty good support for AIO, including to files. > > Obviously, not portable. > > Look: > > On Darwin (10.4+) > > aio_cancel(2) - cancel an outstanding asynchronous I/O > operation (REALTIME) > aio_error(2) - retrieve error status of asynchronous I/O > operation (REALTIME) > aio_read(2) - asynchronous read from a file (REALTIME) > aio_return(2) - retrieve return status of asynchronous I/O > operation (REALTIME) > aio_suspend(2) - suspend until asynchronous I/O operations > or timeout complete (REALTIME) > aio_write(2) - asynchronous write to a file (REALTIME) > > On Solaris: > > On Linux: > > aio_return (3) - get return status of asynchronous I/O operation > aio.h (0p) - asynchronous input and output (REALTIME) > aio_cancel (3) - cancel an outstanding asynchronous I/O request > aio_error (3p) - retrieve errors status for an asynchronous I/O > operation (REALTIME) > aio_error (3) - get error status of asynchronous I/O operation > aio_suspend (3) - wait for asynchronous I/O operation or timeout > aio_read (3p) - asynchronous read from a file (REALTIME) > aio_return (3p) - retrieve return status of an asynchronous I/O > operation (REALTIME) > aio_write (3p) - asynchronous write to a file (REALTIME) > aio_cancel (3p) - cancel an asynchronous I/O request (REALTIME) > aio_fsync (3) - asynchronous file synchronization > aio_fsync (3p) - asynchronous file synchronization (REALTIME) > aio_write (3) - asynchronous write > aio_suspend (3p) - wait for an asynchronous I/O request (REALTIME) > aio_read (3) - asynchronous read > > On Solaris (2.8+) > > # apropos aio > aio aio (3head) - asynchronous input and output > aio_cancel aio_cancel (3rt) - cancel asynchronous I/O request > aio_error aio_error (3rt) - retrieve errors status for an > asynchronous I/O operation > aio_fsync aio_fsync (3rt) - asynchronous file synchronization > aio_read aio_read (3rt) - asynchronous read from a file > aio_req aio_req (9s) - asynchronous I/O request structure > aio_return aio_return (3rt) - retrieve return status of an > asynchronous I/O operation > aio_suspend aio_suspend (3rt) - wait for asynchronous I/O request > aio_write aio_write (3rt) - asynchronous write to a file > aiocancel aiocancel (3aio) - cancel an asynchronous operation > aioread aioread (3aio) - read or write asynchronous I/O > operations > aiowait aiowait (3aio) - wait for completion of asynchronous > I/O operation > aiowrite aioread (3aio) - read or write asynchronous I/O > operations > libaio libaio (3lib) - the asynchronous I/O library > > What we'd need is available on all above platforms: > > aio_write > aio_cancel > aio_suspend > > So, what is the problem? http://www.gnu.org/software/libc/manual/html_node/Configuration-of-AIO.html |