Re: [PATCH 4 of 4] Introduce aio system call submission and completion system calls

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <ak@...>
Cc: <linux-kernel@...>, <linux-aio@...>, Suparna Bhattacharya <suparna@...>, Benjamin LaHaise <bcrl@...>, Linus Torvalds <torvalds@...>
Date: Wednesday, January 31, 2007 - 3:23 pm

On Jan 31, 2007, at 9:21 AM, Andi Kleen wrote:


Most fundamentally?  Providing AIO system call functionality at a  
much lower maintenance cost.  The hope is that the cost of adopting  
these fibril things will be lower than the cost of having to touch a  
code path that wants AIO support.

I simply don't believe that it's cheap to update code paths to  
support non-blocking state machines.  As just one example of a  
looming cost, consider the retry-based buffered fs AIO patches that  
exist today.  Their requirement to maintain these precisely balanced  
code paths that know to only return -EIOCBRETRY once they're at a  
point where retries won't access current-> seems.. unsustainable to  
me.  This stems from the retries being handled off in the aio kernel  
threads which have their own task_struct.  fs/aio.c goes to the  
trouble of migrating ->mm from the submitting task_struct, but  
nothing else.  Continually adjusting this finely balanced  
relationship between paths that return -EIOCBRETY and the fields of  
task_struct that fs/aio.c knows to share with the submitting context  
seems unacceptably fragile.

Even with those buffered IO patches we still only get non-blocking  
behaviour at a few specific blocking points in the buffered IO path.   
It's nothing like the guarantee of non-blocking submission returns  
that the fibril-based submission guarantees.


Smaller startup costs and fewer behavioural differences.  Did that  
message to Nick about ioprio and io_context resonate with you at all?


Why are we limiting the scope of moving to a state machine just to  
the VFS?  If you look no further than some hypothetical AIO iscsi/aoe/ 
nbd/whatever target you obviously include networking.  Probably splice 
() if you're aggressive :).

Let's be clear.  I would be thrilled if AIO was implemented by native  
non-blocking handler implementations.  I don't think it will happen.   
Not because we don't think it sounds great on paper, but because it's  
a hugely complex endeavor that would take development and maintenance  
effort away from the task of keeping basic functionality working.

So the hope with fibrils is that we lower the barrier to getting AIO  
syscall support across the board at an acceptable cost.

It doesn't *stop* us from migrating very important paths (storage,  
networking) to wildly optimized AIO implementations.  But it also  
doesn't force AIO support to wait for that.


To quibble, "waved away" implies that they've been dismissed.  That's  
not right.  It's a work in progress, so yes, there will be more  
fiddly details discovered and addressed over time.  The hope is that  
when it's said and done it'll still be worth merging.  If at some  
point it gets to be too much, well, at least we'll have this work to  
reference as a decisive attempt.


I'll try and get some numbers for you sooner rather than later.

Thanks for being diligent, this is exactly the kind of hard look I  
want this work to get.

- z
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Tue Jan 30, 4:39 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Fri Feb 9, 6:33 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, David Miller, (Sat Feb 10, 8:56 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Sat Feb 10, 10:49 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, bert hubert, (Sat Feb 10, 6:47 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Davide Libenzi, (Sat Feb 10, 2:19 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Eric Dumazet, (Fri Feb 9, 8:04 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Fri Feb 9, 8:12 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Davide Libenzi, (Fri Feb 9, 7:11 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Fri Feb 9, 7:35 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Davide Libenzi, (Sat Feb 10, 2:45 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Sat Feb 10, 3:01 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Davide Libenzi, (Sat Feb 10, 4:59 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Sat Feb 10, 3:35 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Davide Libenzi, (Sun Feb 4, 1:13 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Davide Libenzi, (Sun Feb 4, 4:00 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Benjamin Herrenschmidt, (Tue Jan 30, 10:04 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Wed Jan 31, 1:38 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Benjamin LaHaise, (Wed Jan 31, 1:51 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Wed Jan 31, 3:25 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Benjamin LaHaise, (Wed Jan 31, 4:05 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Wed Jan 31, 4:41 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Tue Jan 30, 10:46 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Wed Jan 31, 1:47 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Nick Piggin, (Wed Jan 31, 1:36 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Wed Jan 31, 2:20 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Wed Jan 31, 2:06 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Joel Becker, (Wed Jan 31, 4:13 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Ingo Molnar, (Wed Jan 31, 4:43 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Nick Piggin, (Wed Jan 31, 1:51 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Benjamin Herrenschmidt, (Wed Jan 31, 1:16 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Tue Jan 30, 11:02 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Wed Jan 31, 1:59 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Xavier Bestel, (Wed Jan 31, 6:50 am)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Wed Jan 31, 3:28 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Tue Jan 30, 5:58 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Tue Jan 30, 6:40 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Tue Jan 30, 6:53 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Tue Jan 30, 7:45 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Benjamin Herrenschmidt, (Tue Jan 30, 10:07 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Linus Torvalds, (Tue Jan 30, 6:23 pm)
Re: [PATCH 0 of 4] Generic AIO by scheduling stacks, Zach Brown, (Tue Jan 30, 6:53 pm)
Re: [PATCH 4 of 4] Introduce aio system call submission and ..., Zach Brown, (Wed Jan 31, 3:23 pm)
Re: [PATCH 4 of 4] Introduce aio system call submission and ..., Suparna Bhattacharya, (Thu Feb 1, 7:13 am)
Re: [PATCH 4 of 4] Introduce aio system call submission and ..., Suparna Bhattacharya, (Thu Feb 1, 11:35 pm)
Re: [PATCH 4 of 4] Introduce aio system call submission and ..., Suparna Bhattacharya, (Fri Feb 2, 3:19 am)
[PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Tue Jan 30, 4:39 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Sun Feb 4, 1:12 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 1:54 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Thu Feb 1, 4:36 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Thu Feb 1, 4:07 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Fri Feb 2, 6:49 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 11:56 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Fri Feb 2, 6:21 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 1:02 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 2:52 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 3:20 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 3:38 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Fri Feb 2, 7:37 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, bert hubert, (Mon Feb 5, 5:36 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Mon Feb 5, 5:57 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Scot McKinley, (Mon Feb 5, 8:27 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Joel Becker, (Mon Feb 5, 8:48 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, David Miller, (Mon Feb 5, 8:48 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 6:34 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, bert hubert, (Mon Feb 5, 6:07 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 6:15 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 1:12 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 2:24 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, David Miller, (Mon Feb 5, 5:44 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 8:15 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Fri Feb 2, 8:02 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 6:49 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Fri Feb 2, 7:55 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 8:56 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Sat Feb 3, 4:23 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 1:44 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 3:26 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 3:41 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 4:10 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Mon Feb 5, 4:39 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 5:21 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 5:09 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Mon Feb 5, 8:32 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Kent Overstreet, (Mon Feb 5, 5:31 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Tue Feb 6, 4:46 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Kent Overstreet, (Tue Feb 6, 6:45 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Tue Feb 6, 7:23 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Joel Becker, (Tue Feb 6, 7:39 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Tue Feb 6, 7:56 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Joel Becker, (Tue Feb 6, 8:06 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Tue Feb 6, 8:23 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Joel Becker, (Tue Feb 6, 8:44 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Michael K. Edwards, (Wed Feb 7, 2:16 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Michael K. Edwards, (Wed Feb 7, 5:17 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Michael K. Edwards, (Wed Feb 7, 5:37 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Tue Feb 6, 9:15 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Joel Becker, (Tue Feb 6, 9:30 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Kent Overstreet, (Tue Feb 6, 9:24 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Tue Feb 6, 7:04 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Kent Overstreet, (Tue Feb 6, 9:22 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, David Miller, (Tue Feb 6, 5:16 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Tue Feb 6, 5:28 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, David Miller, (Tue Feb 6, 5:31 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Tue Feb 6, 5:50 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Tue Feb 6, 6:28 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Eric Dumazet, (Tue Feb 6, 5:46 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Tue Feb 6, 4:25 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 4:21 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Mon Feb 5, 4:42 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Matt Mackall, (Sat Feb 3, 5:25 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Sat Feb 3, 6:03 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Suparna Bhattacharya, (Sat Feb 3, 3:15 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Mon Feb 5, 12:44 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 4:14 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 5:30 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Fri Feb 2, 6:42 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 7:01 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 7:17 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, bert hubert, (Fri Feb 2, 8:23 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Davide Libenzi, (Fri Feb 2, 4:58 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Linus Torvalds, (Fri Feb 2, 5:09 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Thu Feb 1, 9:02 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Andi Kleen, (Fri Feb 2, 9:22 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Thu Feb 1, 5:52 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Benjamin LaHaise, (Thu Feb 1, 6:23 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Zach Brown, (Thu Feb 1, 6:37 pm)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Christoph Hellwig, (Thu Feb 1, 9:19 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Andi Kleen, (Fri Feb 2, 9:23 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Thu Feb 1, 9:52 am)
Re: [PATCH 2 of 4] Introduce i386 fibril scheduling, Ingo Molnar, (Thu Feb 1, 2:02 pm)
[PATCH 1 of 4] Introduce per_call_chain(), Zach Brown, (Tue Jan 30, 4:39 pm)