linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <jlbec@evilplan.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Jan Kara <jack@suse.cz>, Josef Bacik <jbacik@fusionio.com>,
	lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org
Subject: Re: [ATTEND] [LSF TOPIC] What to do about O_DIRECT?
Date: Tue, 5 Feb 2013 16:40:53 -0800	[thread overview]
Message-ID: <20130206004051.GA12174@localhost> (raw)
In-Reply-To: <20130205215112.GQ2667@dastard>

On Wed, Feb 06, 2013 at 08:51:12AM +1100, Dave Chinner wrote:
> The advantage of using shared code is that it eases the burden of
> maintenance and enhancement on individual filesystems.  Both Josef
> and I are putting forward the argument that the shared direct IO
> code provides neither of those advantages any more due to current
> complexity and fragility that has resulted from the monolithic
> "everything for everyone" approach we currently have.
> 
> What I'm trying to say is that maybe there's a better way of
> providing generic direct IO support. Perhaps we are better served by
> having smaller generic helpers similar to the buffered IO path to
> allow filesystems to the simple stuff as optimally as possible
> without all the overhead they don't need. One-size-fits-all has
> never worked in the filesystems game, yet we seem to be stuck on
> that approach here even when it appears to be collapsing under it's
> own weight.... :/

	I vote for trying the helper approach.  I think dropping generic
code altogether would be a disaster.  The corner cases of O_DIRECT are
legion; everyone has behavioral assumptions based on historical
implementations, etc.  Remember how badly some high-performance software
handles O_DIRECT alignments larger than 512B.
	We have a long history of successfully inverting the generic
code with helpers and (if necessary, I'm not saying it is) operations
structures.
	I don't think I'd try to shove down generic_aio_read/write.  Let
them handle the check for O_DIRECT and the fallback to buffered I/O.

Joel


-- 

"And yet I fight,
 And yet I fight this battle all alone.
 No one to cry to;
 No place to call home."

			http://www.jlbec.org/
			jlbec@evilplan.org

  reply	other threads:[~2013-02-06  0:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 22:10 [ATTEND] [LSF TOPIC] What to do about O_DIRECT? Josef Bacik
2013-01-18 22:49 ` Zach Brown
2013-01-18 23:01 ` Theodore Ts'o
2013-01-20 22:35   ` Dave Chinner
2013-01-21 14:35     ` Josef Bacik
2013-01-22 14:03 ` Jan Kara
2013-01-30 23:16   ` Dave Chinner
2013-01-31 22:41     ` Jan Kara
2013-02-05 21:51       ` Dave Chinner
2013-02-06  0:40         ` Joel Becker [this message]
2013-02-06  4:32           ` Kent Overstreet
2013-02-06 17:36         ` Jan Kara

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=20130206004051.GA12174@localhost \
    --to=jlbec@evilplan.org \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=jbacik@fusionio.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).