Thread (4 messages) 4 messages, 3 authors, 2011-06-29

Re: [PATCH] dio: Fast-path for page-aligned IOs

From: Theodore Ts'o <hidden>
Date: 2011-06-29 21:10:10

Andi Kleen <andi <at> firstfloor.org> writes:
quoted
You're right that these preconditions are rather rigid, though. If you
have a suggestion for a more general precondition, I can try it out
and see if it maintains the performance properties I want.
Not fully sure, but I would be interested in support for 512 byte sectors
at least.
Looking at the code while I've been reviewing it, it seems to me that a goodly 
amount of the speedup is due to the fact that we can add pages to the bio one 
full page at a time, using bio_add_page() in a simple for loop.  The original 
code, has to go through the whole direct_io_worker(), do_direct_IO(), 
submit_page_section(), dio_send_cur_page(), and dio_bio_add_page().

That's 8 lines of code in the fast path, and close to 400 lines of code in the 
generic section.   (Is it at all surprising the proposed fast path code is 
faster?)   Most of this is due to the need to deal with file systems where the 
block sizes don't line up with the page sizes.  So supporting file systems with 
sub-page-size block sizes is what introduces all of the hair.

-- Ted

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help