From owner-freebsd-current@FreeBSD.ORG Tue Jan 24 01:12:51 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D43F16A41F; Tue, 24 Jan 2006 01:12:51 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail20.syd.optusnet.com.au (mail20.syd.optusnet.com.au [211.29.132.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A14F43D45; Tue, 24 Jan 2006 01:12:50 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail20.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0O1CiIj020012 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 24 Jan 2006 12:12:44 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0O1ChHh037656; Tue, 24 Jan 2006 12:12:44 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0O1Chfb037655; Tue, 24 Jan 2006 12:12:43 +1100 (EST) (envelope-from pjeremy) Date: Tue, 24 Jan 2006 12:12:43 +1100 From: Peter Jeremy To: Julian Elischer Message-ID: <20060124011243.GT25397@cirb503493.alcatel.com.au> References: <43D05151.5070409@elischer.org> <200601231616.49140.jhb@freebsd.org> <43D55739.80608@elischer.org> <20060123224756.R48094@fledge.watson.org> <43D56468.1060101@elischer.org> <20060123232836.M48094@fledge.watson.org> <43D56E79.60504@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43D56E79.60504@elischer.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-current@freebsd.org, Robert Watson Subject: Re: kernel thread as real threads.. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2006 01:12:51 -0000 On Mon, 2006-Jan-23 16:02:01 -0800, Julian Elischer wrote: >>And any others I don't remember. We may find we need to perform an >>aio drain wait there if we switch to doing AIO in the process context. > >I don't think so.. >IO is really 2 stage: > >for read, data is read into the cache by standard async kernel code. >then the thread wakes up and writes it to the user space. >if the thread has died the async request is still allowed to complete. Is this done as a one-off event, or will data be copied from kernel to userland as the data arrives in the kernel? The former implies that the userland buffer is (pretty much) atomically updated - it is unchanged until all the available data arrives, at which point it is all copied into userland and the aio flagged as complete. The latter implies that parts of the userland buffer will update gradually. The difference primarily affects large requests (and the latter approach implies that less kernel resources will be tied up by the I/O). What about the write case? -- Peter Jeremy