comparison src/os/unix/ngx_file_aio_read.c @ 3065:113cd532b328

aio sendfile
author Igor Sysoev <igor@sysoev.ru>
date Sun, 30 Aug 2009 09:52:39 +0000
parents 6060225e9261
children 04cfc09b8b8d
comparison
equal deleted inserted replaced
3064:23e6f26fb4bd 3065:113cd532b328
13 * FreeBSD file AIO features and quirks: 13 * FreeBSD file AIO features and quirks:
14 * 14 *
15 * if an asked data are already in VM cache, then aio_error() returns 0, 15 * if an asked data are already in VM cache, then aio_error() returns 0,
16 * and the data are already copied in buffer; 16 * and the data are already copied in buffer;
17 * 17 *
18 * aio_read() preread in VM cache as minimum 32K; 18 * aio_read() preread in VM cache as minimum 16K (probably BKVASIZE);
19 * the first AIO preload may be up to 128K;
19 * 20 *
20 * aio_read/aio_error() may return EINPROGRESS for just written data; 21 * aio_read/aio_error() may return EINPROGRESS for just written data;
21 * 22 *
22 * kqueue EVFILT_AIO filter is level triggered only: an event repeats 23 * kqueue EVFILT_AIO filter is level triggered only: an event repeats
23 * until aio_return() will be called; 24 * until aio_return() will be called;
58 aio->file = file; 59 aio->file = file;
59 aio->fd = file->fd; 60 aio->fd = file->fd;
60 aio->event.data = aio; 61 aio->event.data = aio;
61 aio->event.ready = 1; 62 aio->event.ready = 1;
62 aio->event.log = file->log; 63 aio->event.log = file->log;
64 #if (NGX_HAVE_AIO_SENDFILE)
65 aio->last_offset = -1;
66 #endif
63 file->aio = aio; 67 file->aio = aio;
64 } 68 }
65 69
66 ev = &aio->event; 70 ev = &aio->event;
67 71