Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2002 00:35:05 -0500
From:      Craig Rodrigues <rodrigc@attbi.com>
To:        freebsd-current@freebsd.org
Cc:        freebsd-standards@freebsd.org
Subject:   Question about POSIX AIO
Message-ID:  <20021115003505.A5578@attbi.com>

next in thread | raw e-mail | index | archive | help
Hi,

I am running a -CURRENT system.

I had some code that was calling aio_suspend(), and
was setting errno to EINVAL.  From the man page for aio_suspend:

     [EINVAL]           iocbs contains more than AIO_LISTIO_MAX asynchronous
                        I/O requests, or at least one of the requests is not
                        valid.


I reduced my list of I/O requests to AIO_LISTIO_MAX -1, and I did not
got EINVAL any more.

My question is, why are the following values different?

The following program:

#include <aio.h>
#include <unistd.h>
#include <stdio.h>

int
main(int argc, char *argv)
{
  printf("%d\n", AIO_LISTIO_MAX);
  printf("%d\n", sysconf(_SC_AIO_LISTIO_MAX));
}

will print:
16
-1

sysctl -a | grep aio will return:

vfs.aio.max_aio_procs: 32
vfs.aio.num_aio_procs: 4
vfs.aio.target_aio_procs: 4
vfs.aio.max_aio_queue: 1024
vfs.aio.num_queue_count: 0
vfs.aio.num_buf_aio: 0
vfs.aio.aiod_timeout: 1000
vfs.aio.aiod_lifetime: 3000
vfs.aio.unloadable: 0
vfs.aio.max_aio_per_proc: 32
vfs.aio.max_aio_queue_per_proc: 256
vfs.aio.max_buf_aio: 16
p1003_1b.aio_listio_max: 0
p1003_1b.aio_max: 0
p1003_1b.aio_prio_delta_max: 0


How can I get sysconf(_SC_AIO_LISTIO_MAX) to return something sensible,
ie. where would I need to look in order to patch the system?

Thanks.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021115003505.A5578>