public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Dan Williams <dan.j.williams@intel.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	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: Mon, 23 Jan 2017 16:58:17 +0100	[thread overview]
Message-ID: <20170123155817.GA517@lst.de> (raw)
In-Reply-To: <BY2PR21MB0036CA85562DDD21814C0B27CB720@BY2PR21MB0036.namprd21.prod.outlook.com>

On Mon, Jan 23, 2017 at 06:37:18AM +0000, Matthew Wilcox wrote:
> Wow, DAX devices look painful and awful.  I certainly don't want to be
> exposing the memory fronted by my network filesystem to userspace to
> access.  That just seems like a world of pain and bad experiences.

So what is your interest in using DAX for your file system then instead
of a private mechanisms?

> Absolutely the filesystem (or perhaps better, the ACPI tables) need to
> mark that chunk of memory as reserved, but it's definitely not available
> for anyone to access without the filesystem being aware.

That does sounds like a massive special case all over the stack.
But until we see it I think we should simply ignore this case and
concentrate on what we have right now.

> Even if we let the filesystem create a DAX device that doesn't show
> up in /dev (for example), Dan's patches don't give us a way to go
> from a file on the filesystem to a set of dax_ops.

Which doesn't make sense any way.  The entry points into the file system
are read + write and mmap, and the file system might then use libraries
to implement different types of I/O, such as the page cache or DAX.

> And it does need to be a per-file operation, eg to support a file on
> an XFS volume which might be on a RT device or a normal device.
> That was why I leaned towards an address_space operation, but I'd be
> happy to see an inode_operation instead. 

Again, no.  The layers above the file system have absolutely no business
to even know if we're using DAX or pagecache access, nevermind how
in detail they are used.  Assuming you want to use DAX-like semantics
it's up to the lower level to expose the correct operations for
a given memory region.  Right now these would just be intel nfit or
legacy 820 + ADR for regions marked such in the memory map.  If say
a hypervisor wants to expose a region that needs a special flush
call or even has requirements on the type of memcpy it needs to
provide operations for this memory region.  The user of this region
(DAX-native file system pmem driver or device DAX) then needs
to use these methods.

And those pretty much are the methods Dan proposes here - it's
just that we should not tie them to block device operations, at
least not in the long run.

  parent reply	other threads:[~2017-01-23 15:58 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
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 [this message]
2017-01-22 17:30     ` Dan Williams
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=20170123155817.GA517@lst.de \
    --to=hch@lst.de \
    --cc=axboe@fb.com \
    --cc=dan.j.williams@intel.com \
    --cc=dm-devel@redhat.com \
    --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@ml01.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