Re: Async I/O at AIX 5.2

From: JOSEPH KREMBLAS (JKREMBLAS@REDHEARTGIFTS.COM)
Date: Mon Mar 29 2004 - 17:04:12 EST


The AIX 5.2 Release Notes contains a section that describes AIO at
http://publib.boulder.ibm.com/pseries/aixgen/relnotes/52RELNOTES/1007390
3.htm. The text follows.
-----
Asynchronous I/O (AIO)

Legacy AIO has a new subroutine called aio_nwait_timeout
(_posix_aio_nwait_timeout in POSIX). It extends the capabilities of the
aio_nwait subroutine by adding a fourth parameter to specify timeout
values. It is not available through the /usr/include/aio.h file or
libc.a library, so it must be accessed directly from the kernel.

The aio_nwait_timeout subroutine is a new system call that is exported
from the AIO subsystem and is declared as the following:

int aio_nwait_timeout (max_cnt, req_cnt, aiocbpa, timeout)
int max_cnt;
int req_cnt;
struct aiocbp **aiocbpa;
uint timeout;
The first three arguments of this subroutine are the same as the first
three arguments of the aio_nwait subroutine. The aio_nwait_timeout
subroutine waits for a certain number of asynchronous I/O operations to
complete as specified by the req_cnt parameter, or until the call has
blocked for a certain duration specified by the timeout parameter.

The max_cnt parameter indicates the maximum number of pointers to the
aiocbp structure that can be copied into the aiocbpa array.

The timeout value is specified in units of milliseconds. A timeout value
of -1 indicates that the subroutine should behave like the aio_nwait
subroutine, blocking until all of the requested I/O operations complete
or until there are no more asynchronous I/O requests pending from the
process.

A timeout value of 0 indicates that the subroutine will return
immediately with the current completed number of asynchronous I/O
requests. All other positive timeout values indicate that the subroutine
needs to block until either the timeout value is reached or the
requested number of asynchronous I/O operations complete.

The aio_nwait_timeout subroutine has to be redefined and accessed from
POSIX AIO as _posix_aio_nwait_timeout.

To access the subroutine in Legacy AIO when compiling, use the
aio_nwait_timeout.imp import file, which contains the following:

#!/unix

aio_nwait_timeout
Assuming the aio_nwait_timout subroutine is called inside of the
testcase.c file, compile it with the following:

cc -D_AIO_AIX_SOURCE -o testcase -bI:./aio_nwait_timeout.imp testcase.c

To access the subroutine in POSIX AIO when compiling, use the
aio_nwait_timeout.imp import file which contains the following:

#!/unix

_posix_aio_nwait_timeout
Assuming the _posix_aio_nwait_timeout subroutine is called inside of the
testcase.c file, compile it with the following:

cc -o testcase -bI:./aio_nwait_timeout.imp testcase.c
-----

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of
pSeries AIX Geek
Sent: Monday, March 29, 2004 2:46 PM
To: aix-l@Princeton.EDU
Subject: Re: Async I/O at AIX 5.2

It's not that complete (as I'd expect from IBM docs).

Anyone have real-world experience?

- pAG

--- Bob.Kelley@BRINKSINC.COM wrote:
> found this reference but I haven't read up yet
>
>
http://publib16.boulder.ibm.com/pseries/en_US/aixprggd/kernextc/async_io
_subsys.htm
>
>
>
> Bobby Kelley Jr.
> 972-877-5341
>
>
>
> |---------+---------------------------->
> | | pSeries AIX Geek |
> | | <aixgeek@YAHOO.CO|
> | | M> |
> | | Sent by: IBM AIX |
> | | Discussion List |
> | | <aix-l@Princeton.|
> | | EDU> |
> | | |
> | | |
> | | 03/28/2004 07:09 |
> | | PM |
> | | Please respond to|
> | | IBM AIX |
> | | Discussion List |
> | | |
> |---------+---------------------------->
>
>
>-----------------------------------------------------------------------
----------------------------------------------------------------------|
> |
>
> |
> | To: aix-l@Princeton.EDU
>
> |
> | cc:
>
> |
> | Subject: Async I/O at AIX 5.2
>
> |
>
>
>-----------------------------------------------------------------------
----------------------------------------------------------------------|
>
>
>
>
> There are two different aio devices at AIX 5.2:
> aio0
> (legacy) and posix_aio0 (new at AIX 5.2).
>
> Anyone have any comments on the difference?
>
> aio0 is marked as the "legacy" version (run "lsdev
> -C
> | grep aio"), but yet, it's different, in that
> maxservers/minservers are set on a CPU basis, not system-wide.
>
>
> - pAG
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on
> time.
> http://taxes.yahoo.com/filing.html
>
>
>
>
> NOTICE TO BRINK'S EMPLOYEES:
> All electronic mail communications composed, sent,
> received or stored on or
> through Brink's equipment are subject to the Brink's
> Electronic
> Communications Policy. Employees should have no
> expectation of privacy in
> their use of the Company's electronic mail system.

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:47 EDT