FreeBSD disk AIO support
Andrei Nigmatulin
andrei.nigmatulin at gmail.com
Mon Aug 24 04:35:26 MSD 2009
On Monday 24 August 2009 02:23, Andrei Nigmatulin wrote:
> On Monday 24 August 2009 01:13, Igor Sysoev wrote:
> > On Sun, Aug 23, 2009 at 10:44:58PM +0400, Вадим wrote:
> > > Здравствуйте.
> > >
> > > OpenSUSE 11.0 и выше, например.
> >
> > Поставил openSUSE 11.1.
> >
> > > uname -r
> >
> > 2.6.27.7-9-default
> >
> > > /lib/libc.so.6
> >
> > GNU C Library stable release version 2.9 (20081117), by Roland McGrath et
> > al. ...
> >
> > /usr/include/libaio.h:
> >
> > struct iocb {
> > PADDEDptr(void *data, __pad1); /* Return in the io completion
> > event */ PADDED(unsigned key, __pad2); /* For use in identifying io
> > requests */
> >
> > short aio_lio_opcode;
> > short aio_reqprio;
> > int aio_fildes;
> >
> > union {
> > struct io_iocb_common c;
> > ...
> >
> > struct io_iocb_common {
> > PADDEDptr(void *buf, __pad1);
> > PADDEDul(nbytes, __pad2);
> > long long offset;
> > long long __pad3, __pad4;
> > }; /* result code is the amount read or -'ve errno */
> >
> >
> > Полей .aio_flags и .aio_resfd в struct iocb нет. Ну и как это собирать ?
>
> А если
>
> -#include <libaio.h>
> +#include <linux/aio_abi.h>
>
> ?
Похоже, что libaio >= 0.3.107 имеет поддержку eventfd (патч добавил Rusty
Russell) и искомые поля есть в io_iocb_common.
--
Andrei Nigmatulin
GPG PUB KEY 6449830D
Now I lay me down to sleep(3)
Pray the OS my core to keep
If I die before I wake
Pray the Disk my core to take
More information about the nginx-ru
mailing list