Andi Kleen <andi <at> firstfloor.org> writes: > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html