From: Matthew Wilcox <willy@linux.intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>,
linux-fsdevel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 3/5] block: Add support for DAX on block devices
Date: Tue, 30 Jun 2015 15:56:15 -0400 [thread overview]
Message-ID: <20150630195614.GG1971@linux.intel.com> (raw)
In-Reply-To: <20150630111949.GA28508@infradead.org>
On Tue, Jun 30, 2015 at 04:19:49AM -0700, Christoph Hellwig wrote:
> On Mon, Jun 29, 2015 at 04:02:30PM -0400, Matthew Wilcox wrote:
> > From: Matthew Wilcox <willy@linux.intel.com>
> >
> > Without this patch, accesses to a file on a filesystem on a block device
> > could be done without the page cache, but accessing the block device
> > itself would always go through the page cache.
> >
> > Now reads and writes to a block device that is capable of DAX will always
> > bypass the page cache. Loads and stores to an mmapped block device will
> > bypass the page cache if the user specified O_DIRECT. This opt-in from
> > the user is necessary because DAX mappings are currently incompatible
> > with RDMA and O_DIRECT I/Os with non-DAX files.
>
> Using O_DIRECT for this seems like a pretty horrible hack, so I'd like
> to see a really good justification of using this over other interfaces.
O_DIRECT means "bypass the page cache", which is what this does (now it's
able to apply to mmap too).
> Also it needs a Cc to linux-api and an entry in the open man page, and
> and even better explanation of why we only support this interface on
> block devices but not file systems.
Um, we do support this for filesystems with DAX. The inconsistency we
have is that if you have a direct-access-capable block device, currently
files in a filesystem on it get the bypass-page-cache treatment, but if
you use the raw block device directly, that mapping doesn't.
> Last but least I supect we'll need a runtime option for direct_access
> support in the brd devices, as we're now going to use the regular
> block device path less and less.
I'm getting there; I was working on getting DAX to dynamically map the
pages that it used (rather than relying on them being permanently part
of the direct mapping), but I had to set that work aside temporarily.
That lets us just delete the compile option, and have direct_access
always work on brd.
next prev parent reply other threads:[~2015-06-30 19:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 20:02 [PATCH 0/5] DAX updates for 4.2 Matthew Wilcox
2015-06-29 20:02 ` [PATCH 1/5] dax: Add block size note to documentation Matthew Wilcox
2015-06-29 20:02 ` [PATCH 2/5] dax: Use copy_from_iter_nocache Matthew Wilcox
2015-06-29 20:02 ` [PATCH 3/5] block: Add support for DAX on block devices Matthew Wilcox
2015-06-30 11:19 ` Christoph Hellwig
2015-06-30 19:56 ` Matthew Wilcox [this message]
2015-07-01 7:19 ` Christoph Hellwig
2015-06-29 20:02 ` [PATCH 4/5] ext4: Use ext4_get_block_write() for DAX Matthew Wilcox
2015-06-29 20:02 ` [PATCH 5/5] vfs: Allow truncate, chomd and chown to be interrupted by fatal signals Matthew Wilcox
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=20150630195614.GG1971@linux.intel.com \
--to=willy@linux.intel.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew.r.wilcox@intel.com \
--cc=viro@zeniv.linux.org.uk \
/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.