From owner-freebsd-arch@FreeBSD.ORG Sun Jul 22 16:53:59 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72868106566C for ; Sun, 22 Jul 2012 16:53:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9738FC08 for ; Sun, 22 Jul 2012 16:53:59 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 9C48146B17; Sun, 22 Jul 2012 12:53:58 -0400 (EDT) Date: Sun, 22 Jul 2012 17:53:58 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Matthew Jacob In-Reply-To: <500752CD.9030107@feral.com> Message-ID: References: <3CE55F29-A5B2-44A7-8854-1ED38BAE6F16@FreeBSD.org> <50075072.5050906@gmail.com> <500752CD.9030107@feral.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: aio in GENERIC? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2012 16:53:59 -0000 On Wed, 18 Jul 2012, Matthew Jacob wrote: > What practically does aio offer that is not achieved via pthreads other than > slightly simpler code? Although the VFS side of the AIO code blocks kernel threads during in-progress I/O, the socket side is able to do fully asynchronous I/O down the stack without committing a kernel thread to it. As such, it probably is actually significantly more scalable, allowing larger numbers of simultaneous outstanding I/Os in the network layer, and more efficiently than simply using threads. Robert