From: Dan Williams <dan.j.williams@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
Brian Boylston <brian.boylston@hpe.com>,
Tony Luck <tony.luck@intel.com>, Jan Kara <jack@suse.cz>,
Toshi Kani <toshi.kani@hpe.com>,
Mike Snitzer <snitzer@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>, Jeff Moyer <jmoyer@redhat.com>,
Jens Axboe <axboe@fb.com>,
"dm-devel@redhat.com" <dm-devel@redhat.com>,
Ingo Molnar <mingo@redhat.com>, Al Viro <viro@zeniv.linux.org.uk>,
"H. Peter Anvin" <hpa@zytor.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ross Zwisler <ross.zwisler@linux.intel.com>
Subject: Re: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm
Date: Sun, 22 Jan 2017 09:30:23 -0800 [thread overview]
Message-ID: <CAPcyv4jEXsjw_Mo3aLRFmJr8ThqLPJPjdPjz7Q3ZS0ZC-AaDBw@mail.gmail.com> (raw)
In-Reply-To: <20170121175212.GA28180@lst.de>
On Sat, Jan 21, 2017 at 9:52 AM, Christoph Hellwig <hch@lst.de> wrote:
> On Sat, Jan 21, 2017 at 04:28:52PM +0000, Matthew Wilcox wrote:
>> Of course, there may not be a backing device either!
>
> s/backing device/block device/ ? If so fully agreed. I like the dax_ops
> scheme, but we should go all the way and detangle it from the block
> device. I already brought up this issue with the fallback to direct I/O
> on I/O error series.
>
>> I see two possible routes here:
>>
>> 1. Add a new address_space_operation:
>>
>> const struct dax_operations *(*get_dax_ops)(struct address_space *);
>>
>> 2. Add two of the dax_operations to address_space_operations:
>>
>> size_t (*copy_from_iter)(struct address_space *, void *, size_t, struct iov_iter *);
>> void (*flush)(struct address_space *, void *, size_t);
>> (we won't need ->direct_access as an address_space op because that'll be handled a different way in the brave new world that supports non-bdev-based filesystems)
>
> And both of them are wrong. The write_begin/write_end mistake
> notwithstanding address_space ops are operations the VM can call without
> knowing things like fs locking contexts. The above on the other hand
> are device operations provided by the low-level driver, similar to
> block_device operations. So what we need is to have a way to mount
> a dax device as a file system, similar to how we support that for block
> or MTD devices and can then call methods on it. For now this will
> be a bit complicated because all current DAX-aware file systems also
> still need block device for the metadata path, so we can't just say
> you mount either a DAX or block device. But I think we should aim
> for mounting a DAX device as the primary use case, and then deal
> with block device emulation as a generic DAX layer thing, similarly
> how we implement (bad in the rw case) block devices on top of MTD.
So are you saying we need a way to go from a block_device inode to a
dax_device inode and then look up the dax_operations from there?
A filesystem, if it so chooses, could mount on top of the dax_device
inode directly?
I did add a dax_superblock for the device-dax character device
representation I could refactor that so the block_device presentation
of a namespace and a character device presentation are just different
layers on top of the base-level dax inode.
...or am I not tracking what you are suggesting?
next prev parent reply other threads:[~2017-01-22 17:30 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 3:50 [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm Dan Williams
2017-01-20 3:50 ` [PATCH 01/13] x86, dax, pmem: remove indirection around memcpy_from_pmem() Dan Williams
2017-01-20 3:50 ` [PATCH 02/13] block, dax: introduce dax_operations Dan Williams
2017-01-20 17:28 ` Dan Williams
2017-01-20 3:50 ` [PATCH 03/13] x86, dax, pmem: introduce 'copy_from_iter' dax operation Dan Williams
2017-02-03 1:52 ` [lkp-robot] [x86, dax, pmem] 2e12109d1c: fio.write_bw_MBps -75% regression kernel test robot
2017-02-17 3:52 ` [PATCH 03/13] x86, dax, pmem: introduce 'copy_from_iter' dax operation Ross Zwisler
2017-02-17 3:56 ` Dan Williams
2017-01-20 3:50 ` [PATCH 04/13] dax, pmem: introduce an optional 'flush' " Dan Williams
2017-01-20 3:50 ` [PATCH 05/13] x86, dax: replace clear_pmem() with open coded memset + dax_ops->flush Dan Williams
2017-01-20 10:27 ` Jan Kara
2017-01-20 15:33 ` Dan Williams
2017-01-20 3:50 ` [PATCH 06/13] x86, dax, libnvdimm: move wb_cache_pmem() to libnvdimm Dan Williams
2017-01-20 3:50 ` [PATCH 07/13] x86, libnvdimm, pmem: move arch_invalidate_pmem() " Dan Williams
2017-01-20 3:50 ` [PATCH 08/13] x86, libnvdimm, dax: stop abusing __copy_user_nocache Dan Williams
2017-03-28 16:21 ` Ross Zwisler
2017-03-28 16:26 ` Dan Williams
2017-01-20 3:51 ` [PATCH 09/13] libnvdimm, pmem: implement cache bypass for all copy_from_iter() operations Dan Williams
2017-01-20 3:51 ` [PATCH 10/13] libnvdimm, pmem: fix persistence warning Dan Williams
2017-01-20 3:51 ` [PATCH 11/13] libnvdimm, nfit: enable support for volatile ranges Dan Williams
2017-01-20 3:51 ` [PATCH 12/13] libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region Dan Williams
2017-01-20 3:51 ` [PATCH 13/13] libnvdimm, pmem: disable dax flushing for 'cache flush on fail' platforms Dan Williams
[not found] ` <148488421301.37913.12835362165895864897.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-21 16:28 ` [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm Matthew Wilcox
2017-01-21 17:52 ` Christoph Hellwig
2017-01-22 15:43 ` Matthew Wilcox
2017-01-22 16:29 ` Christoph Hellwig
2017-01-22 18:19 ` Matthew Wilcox
2017-01-22 18:30 ` Christoph Hellwig
2017-01-22 18:39 ` Matthew Wilcox
2017-01-22 18:44 ` Christoph Hellwig
2017-01-23 6:37 ` Matthew Wilcox
2017-01-23 7:10 ` Dan Williams
2017-01-23 16:00 ` Christoph Hellwig
2017-01-23 17:14 ` Dan Williams
2017-01-23 18:03 ` Christoph Hellwig
2017-01-23 18:31 ` Dan Williams
2017-01-23 15:58 ` Christoph Hellwig
2017-01-22 17:30 ` Dan Williams [this message]
2017-01-23 16:01 ` Christoph Hellwig
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=CAPcyv4jEXsjw_Mo3aLRFmJr8ThqLPJPjdPjz7Q3ZS0ZC-AaDBw@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=axboe@fb.com \
--cc=brian.boylston@hpe.com \
--cc=dm-devel@redhat.com \
--cc=hch@lst.de \
--cc=hpa@zytor.com \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mawilcox@microsoft.com \
--cc=mingo@redhat.com \
--cc=ross.zwisler@linux.intel.com \
--cc=snitzer@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=toshi.kani@hpe.com \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@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 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).