kaio
[Top] [All Lists]

Re: spotted in the kaio patch

To: Andrew Morton <andrewm@xxxxxxxxxx>
Subject: Re: spotted in the kaio patch
From: Rajagopal Ananthanarayanan <ananth@xxxxxxx>
Date: Mon, 19 Mar 2001 15:41:10 -0800
Cc: kaio@xxxxxxxxxxx, mingo@xxxxxxx
References: <3AB54B71.80DB2CC9@uow.edu.au> <3AB64E89.7374E767@sgi.com> <3AB68A9D.346346FC@uow.edu.au>
Sender: owner-kaio@xxxxxxxxxxx
Andrew Morton wrote:

> 
> >From reading the code.  It's *very* readable code.  Thank you!
> It makes me want to read the raw I/O patch :)

Thank you for finding bugs in it ;-)

> 
> Question, please:
> 
> - I note that Ben LaHaise's embryonic aio patch
>   saves a copy_from_user by pinning the user pages down
>   (map_user_kiobuf).  I assume they're marked COW while I/O
>   is in progress.  Have you considered doing this?  Do
>   you expect there would be benefit (despite Linus'
>   predictions)?


Well, not really. kiobufs are limited to "normal" file I/O.
People who care about copying will use O_DIRECT or avoid
it completely by using RAW devices ... most databases which
are one important classs of AIO users have optimizations for
both RAW & DIRECT.

The one aspect of kiobuf's I like is that they provide a simple
means of "pinning" memory belonging to a user address space.
And I like that not because that enables less copying, but
because the container can be handed over to another thread/process.

In the end I would like KAIO to use system-wide threads for handling
AIO events (such as completion of IO) ... Ben's patch uses keventd,
so that is one approach.  However, Ingo  Molnar had suggested not using any 
threads
at all, but I don't know how that would work. I'm cc:'ing Ingo just
in case he has better ideas.


--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>