kaio
[Top] [All Lists]

lio_listio() atomicity

To: KAIO mailing list <kaio@xxxxxxxxxxx>
Subject: lio_listio() atomicity
From: Christopher Smith <x@xxxxxxxx>
Date: Sun, 6 Feb 2000 04:46:59 -0800
Sender: owner-kaio@xxxxxxxxxxx
User-agent: Mutt/1.1.2i
Hi there. I still haven't moved to the 2.3.x branch so I can't test
out the 2.3.x patch yet. :-(

However, I have a question about lio_listio(). I'm still learning the
aio API's, and I'm wondering about lio_listio() guaruntees of
atomicity.

I know from reading the POSIX definition of lio_listio() that there is
no guaruntee about the order that a list of aiocb's will
complete. What I'm wondering though is if there's any guaruntees about
concurrency with regards to lio_listio(). For example, is it
guarunteed that multiple aiocb's will be executing at once?

For example, if I have 3 buffers:

char *buf1 = "one";
char *buf2 = "two";
char *buf3 = "three";

Let's say I build a list of aiocb's that indicates that all 3 of these
buffers should be written to the same file. Is there any guaruntee
that the file won't look like this:

ontthreewoe

I already know from the spec that this is possible:
onethreetwo

or:

twoonethree

Additionally, I'm curious about the sig argument in lio_listio(). If
the sig argument is set, and each of the individual aiocb's in the
listio() list ALSO have their aio_sigevent field set. Do both signals
get triggered?

--Chris

P.S.: Any feel as to whether lio_listio() provides significant
performance advantages over aio_read() & aio_write()?

<Prev in Thread] Current Thread [Next in Thread>