Re: kernel thread as real threads..

From: Peter Jeremy <PeterJeremy_at_optushome.com.au>
Date: Tue, 24 Jan 2006 12:12:43 +1100
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
Received on Tue Jan 24 2006 - 00:12:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:51 UTC