Discussion:
Linux libaio
Emmanuel Dreyfus
2014-08-20 15:02:57 UTC
Permalink
Hi

What can be done for porting software that depends on Linux libaio?
It seems NetBSD has a POSIX aio feature in librt, was there some
middlewae library developped for porting libaio on NetBSD?
--
Emmanuel Dreyfus
***@netbsd.org
David Holland
2014-08-20 19:40:12 UTC
Permalink
Post by Emmanuel Dreyfus
What can be done for porting software that depends on Linux libaio?
It seems NetBSD has a POSIX aio feature in librt, was there some
middlewae library developped for porting libaio on NetBSD?
First step would be to get aio to work at all... it didn't really last
I tried. :(
--
David A. Holland
***@netbsd.org
Emmanuel Dreyfus
2014-08-21 08:14:19 UTC
Permalink
Post by David Holland
First step would be to get aio to work at all... it didn't really last
I tried. :(
I just gave a try, and aio_read() seems to works fine, but I cannot get
anything else that EIO from lio_listio(). What is your experience?
--
Emmanuel Dreyfus
***@netbsd.org
Emmanuel Dreyfus
2014-08-23 15:38:21 UTC
Permalink
Post by Emmanuel Dreyfus
Post by David Holland
First step would be to get aio to work at all... it didn't really last
I tried. :(
I just gave a try, and aio_read() seems to works fine, but I cannot get
anything else that EIO from lio_listio(). What is your experience?
I hacked a Linux libaio to NetBSD AIO translation layer. It passes 8 out
of 14 tests of Linux libaio regression suite.

Where should it go? In tree? In pkgsrc? Anyone interested helping?
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
***@netbsd.org
Christos Zoulas
2014-08-23 16:35:21 UTC
Permalink
Post by Emmanuel Dreyfus
Post by Emmanuel Dreyfus
Post by David Holland
First step would be to get aio to work at all... it didn't really last
I tried. :(
I just gave a try, and aio_read() seems to works fine, but I cannot get
anything else that EIO from lio_listio(). What is your experience?
I hacked a Linux libaio to NetBSD AIO translation layer. It passes 8 out
of 14 tests of Linux libaio regression suite.
Where should it go? In tree? In pkgsrc? Anyone interested helping?
Sure, where is it? I don't know where it belongs yet :-)

christos
Emmanuel Dreyfus
2014-08-25 16:42:30 UTC
Permalink
Post by Christos Zoulas
Post by Emmanuel Dreyfus
Where should it go? In tree? In pkgsrc? Anyone interested helping?
Sure, where is it? I don't know where it belongs yet :-)
Here is today's work:
http://ftp.espci.fr/shadow/manu/libaio-netbsd.tgz

It passes most of linux's libaio regression tests but I think the
code that returns EFAULT when passed bad adresses may be #ifdef DEBUG

There is also the problem of the libaio-linux.h which partially copied from
Linux's libaio.h and hence is GPL. I need it because programs that
#include <libaio.h> expect to have the various macros such as io_fdsync()

There is an oddity: I need to break transfers larger than PAGE_SIZE into
smaller chunks otherwise I get failures. I suspect this is a bug
in NetBSD AIO.
--
Emmanuel Dreyfus
***@netbsd.org
David Laight
2014-09-26 21:31:25 UTC
Permalink
Post by David Holland
Post by Emmanuel Dreyfus
What can be done for porting software that depends on Linux libaio?
It seems NetBSD has a POSIX aio feature in librt, was there some
middlewae library developped for porting libaio on NetBSD?
First step would be to get aio to work at all... it didn't really last
I tried. :(
IIRC is does a synchronous IO in a worker thread.
There are a varey limited number of such threads, so you can't
really do aio at all.

I don't know what linux does, the only OS I know of that can actually
do aio are RSX/11M and windows.

David
--
David Laight: ***@l8s.co.uk
Paul Goyette
2014-09-26 22:19:42 UTC
Permalink
Post by David Laight
I don't know what linux does, the only OS I know of that can actually
do aio are RSX/11M and windows.
Let's not forget VMS ... :)


-------------------------------------------------------------------------
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer | | pgoyette at netbsd.org |
-------------------------------------------------------------------------
Emmanuel Dreyfus
2014-09-27 00:13:24 UTC
Permalink
Post by David Laight
IIRC is does a synchronous IO in a worker thread.
There are a varey limited number of such threads, so you can't
really do aio at all.
In the meantime I wrote a middleware to offer Linux libaio API using
NetBSD librt: http://ftp.espci.fr/shadow/manu/libaio-netbsd.tgz

It passes almost all Linux libaio regression tests. I am not sure
where it should go now.
--
Emmanuel Dreyfus
***@netbsd.org
Marc Balmer
2014-10-14 07:05:08 UTC
Permalink
Post by Emmanuel Dreyfus
What can be done for porting software that depends on Linux libaio?
It seems NetBSD has a POSIX aio feature in librt, was there some
middlewae library developped for porting libaio on NetBSD?
The library is not enough. The kernel parts of aio are incomplete atm, this needs to be fixed first.
Emmanuel Dreyfus
2014-10-14 08:33:42 UTC
Permalink
Post by Marc Balmer
The library is not enough. The kernel parts of aio are incomplete atm, this needs to be fixed first.
I wrote a middleware that pass almost allLinux libaio regression tests.
Indeed I have to workaround NetBSD kernel problems, but it works in the
end.
--
Emmanuel Dreyfus
***@netbsd.org
Marc Balmer
2014-10-14 18:14:58 UTC
Permalink
This post might be inappropriate. Click to display it.
Emmanuel Dreyfus
2014-10-14 18:58:19 UTC
Permalink
Post by Marc Balmer
Frankly, that sounds like a terrible hack to me... Either you have AIO or
you don't. And NetBSD does not have it.
Some parts of the API actually work. aio_read/aio_wite are fine,
lio_listio is completely broken, but you can mdo without it.
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
***@netbsd.org
Marc Balmer
2014-10-14 19:00:43 UTC
Permalink
Post by Emmanuel Dreyfus
Post by Marc Balmer
Frankly, that sounds like a terrible hack to me... Either you have AIO or
you don't. And NetBSD does not have it.
Some parts of the API actually work. aio_read/aio_wite are fine,
That is not true, afaict. Try doing it from multiple threads, simulataneously.
Post by Emmanuel Dreyfus
lio_listio is completely broken, but you can mdo without it.
Loading...