From: Theodore Ts'o <tytso@google.com>
To: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] dio: Fast-path for page-aligned IOs
Date: Wed, 29 Jun 2011 21:03:50 +0000 (UTC) [thread overview]
Message-ID: <loom.20110629T225335-55@post.gmane.org> (raw)
In-Reply-To: 20110621214413.GB3263@one.firstfloor.org
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
next prev parent reply other threads:[~2011-06-29 21:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 23:17 [PATCH] dio: Fast-path for page-aligned IOs Dan Ehrenberg
2011-06-21 20:41 ` Andi Kleen
2011-06-21 21:21 ` Daniel Ehrenberg
2011-06-21 21:21 ` Daniel Ehrenberg
2011-06-21 21:44 ` Andi Kleen
2011-06-21 21:44 ` Andi Kleen
2011-06-29 21:03 ` Theodore Ts'o [this message]
2011-07-27 21:08 ` Christoph Hellwig
2011-07-27 21:14 ` Andrew Morton
2011-07-27 22:15 ` Jeff Moyer
2011-07-28 22:09 ` Daniel Ehrenberg
2011-07-28 22:09 ` Daniel Ehrenberg
2011-07-28 22:10 ` Daniel Ehrenberg
2011-07-28 22:10 ` Daniel Ehrenberg
-- strict thread matches above, loose matches on Subject: below --
2011-06-20 22:44 Dan Ehrenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110629T225335-55@post.gmane.org \
--to=tytso@google.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.