From owner-freebsd-standards Thu Nov 14 21:29:46 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5D2737B401; Thu, 14 Nov 2002 21:29:43 -0800 (PST) Received: from dibbler.ne.client2.attbi.com (dibbler.ne.client2.attbi.com [24.61.41.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0461643E6E; Thu, 14 Nov 2002 21:29:43 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from dibbler.ne.client2.attbi.com (localhost [127.0.0.1]) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6) with ESMTP id gAF5Z6wL005639; Fri, 15 Nov 2002 00:35:06 -0500 (EST) (envelope-from rodrigc@dibbler.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id gAF5Z5dw005638; Fri, 15 Nov 2002 00:35:05 -0500 (EST) Date: Fri, 15 Nov 2002 00:35:05 -0500 From: Craig Rodrigues To: freebsd-current@freebsd.org Cc: freebsd-standards@freebsd.org Subject: Question about POSIX AIO Message-ID: <20021115003505.A5578@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #include #include 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