All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
To: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	"linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
	<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>,
	linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	"Darrick J. Wong"
	<darrick.wong-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Linux API <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>,
	"J. Bruce Fields"
	<bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>,
	Linux MM <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
	Jeff Moyer <jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	Andy Lutomirski <luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Ross Zwisler
	<ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	linux-fsdevel
	<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: Re: [PATCH v9 0/6] MAP_DIRECT for DAX userspace flush
Date: Tue, 17 Oct 2017 08:46:47 +0200	[thread overview]
Message-ID: <20171017064647.GA15437@lst.de> (raw)
In-Reply-To: <CAPcyv4gtnZu7obG7UwaBq1-fwRZj06HCa=mjBfDKKgfp97nYaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Oct 16, 2017 at 12:44:31PM -0700, Dan Williams wrote:
> > While I agree with the need for a per-MR notification mechanism, one
> > thing we lose by walking away from MAP_DIRECT is a way for a
> > hypervisor to coordinate pass through of a DAX mapping to an RDMA
> > device in a guest. That will remain a case where we will still need to
> > use device-dax. I'm fine if that's the answer, but just want to be
> > clear about all the places we need to protect a DAX mapping against
> > RDMA from a non-ODP device.
> 
> For this specific issue perhaps we promote FL_LAYOUT as a lease-type
> that can be set by fcntl().

I don't think it is a good userspace interface, mostly because it
is about things that don't matter for userspace (block mappings).

It makes sense as a kernel interface for callers that want to pin
down a memory long-term, but for userspace the fact that the block
mapping changes doesn't matter - it matters that their long term
pin is broken by something.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-xfs@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Andy Lutomirski <luto@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Linux API <linux-api@vger.kernel.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Dave Chinner <david@fromorbit.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Linux MM <linux-mm@kvack.org>, Al Viro <viro@zeniv.linux.org.uk>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Jeff Layton <jlayton@poochiereds.net>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v9 0/6] MAP_DIRECT for DAX userspace flush
Date: Tue, 17 Oct 2017 08:46:47 +0200	[thread overview]
Message-ID: <20171017064647.GA15437@lst.de> (raw)
In-Reply-To: <CAPcyv4gtnZu7obG7UwaBq1-fwRZj06HCa=mjBfDKKgfp97nYaw@mail.gmail.com>

On Mon, Oct 16, 2017 at 12:44:31PM -0700, Dan Williams wrote:
> > While I agree with the need for a per-MR notification mechanism, one
> > thing we lose by walking away from MAP_DIRECT is a way for a
> > hypervisor to coordinate pass through of a DAX mapping to an RDMA
> > device in a guest. That will remain a case where we will still need to
> > use device-dax. I'm fine if that's the answer, but just want to be
> > clear about all the places we need to protect a DAX mapping against
> > RDMA from a non-ODP device.
> 
> For this specific issue perhaps we promote FL_LAYOUT as a lease-type
> that can be set by fcntl().

I don't think it is a good userspace interface, mostly because it
is about things that don't matter for userspace (block mappings).

It makes sense as a kernel interface for callers that want to pin
down a memory long-term, but for userspace the fact that the block
mapping changes doesn't matter - it matters that their long term
pin is broken by something.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	linux-xfs@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Arnd Bergmann <arnd@arndb.de>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Linux API <linux-api@vger.kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Linux MM <linux-mm@kvack.org>, Jeff Moyer <jmoyer@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Andy Lutomirski <luto@kernel.org>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Jeff Layton <jlayton@poochiereds.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v9 0/6] MAP_DIRECT for DAX userspace flush
Date: Tue, 17 Oct 2017 08:46:47 +0200	[thread overview]
Message-ID: <20171017064647.GA15437@lst.de> (raw)
In-Reply-To: <CAPcyv4gtnZu7obG7UwaBq1-fwRZj06HCa=mjBfDKKgfp97nYaw@mail.gmail.com>

On Mon, Oct 16, 2017 at 12:44:31PM -0700, Dan Williams wrote:
> > While I agree with the need for a per-MR notification mechanism, one
> > thing we lose by walking away from MAP_DIRECT is a way for a
> > hypervisor to coordinate pass through of a DAX mapping to an RDMA
> > device in a guest. That will remain a case where we will still need to
> > use device-dax. I'm fine if that's the answer, but just want to be
> > clear about all the places we need to protect a DAX mapping against
> > RDMA from a non-ODP device.
> 
> For this specific issue perhaps we promote FL_LAYOUT as a lease-type
> that can be set by fcntl().

I don't think it is a good userspace interface, mostly because it
is about things that don't matter for userspace (block mappings).

It makes sense as a kernel interface for callers that want to pin
down a memory long-term, but for userspace the fact that the block
mapping changes doesn't matter - it matters that their long term
pin is broken by something.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	linux-xfs@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Arnd Bergmann <arnd@arndb.de>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Linux API <linux-api@vger.kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Linux MM <linux-mm@kvack.org>, Jeff Moyer <jmoyer@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Andy Lutomirski <luto@kernel.org>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Jeff Layton <jlayton@poochiereds.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v9 0/6] MAP_DIRECT for DAX userspace flush
Date: Tue, 17 Oct 2017 08:46:47 +0200	[thread overview]
Message-ID: <20171017064647.GA15437@lst.de> (raw)
In-Reply-To: <CAPcyv4gtnZu7obG7UwaBq1-fwRZj06HCa=mjBfDKKgfp97nYaw@mail.gmail.com>

On Mon, Oct 16, 2017 at 12:44:31PM -0700, Dan Williams wrote:
> > While I agree with the need for a per-MR notification mechanism, one
> > thing we lose by walking away from MAP_DIRECT is a way for a
> > hypervisor to coordinate pass through of a DAX mapping to an RDMA
> > device in a guest. That will remain a case where we will still need to
> > use device-dax. I'm fine if that's the answer, but just want to be
> > clear about all the places we need to protect a DAX mapping against
> > RDMA from a non-ODP device.
> 
> For this specific issue perhaps we promote FL_LAYOUT as a lease-type
> that can be set by fcntl().

I don't think it is a good userspace interface, mostly because it
is about things that don't matter for userspace (block mappings).

It makes sense as a kernel interface for callers that want to pin
down a memory long-term, but for userspace the fact that the block
mapping changes doesn't matter - it matters that their long term
pin is broken by something.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2017-10-17  6:46 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12  0:47 [PATCH v9 0/6] MAP_DIRECT for DAX userspace flush Dan Williams
2017-10-12  0:47 ` Dan Williams
2017-10-12  0:47 ` Dan Williams
     [not found] ` <150776922692.9144.16963640112710410217.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-12  0:47   ` [PATCH v9 1/6] mm: introduce MAP_SHARED_VALIDATE, a mechanism to safely define new mmap flags Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
     [not found]     ` <150776923320.9144.6119113178052262946.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-12 13:51       ` Jan Kara
2017-10-12 13:51         ` Jan Kara
2017-10-12 13:51         ` Jan Kara
2017-10-12 13:51         ` Jan Kara
2017-10-12 16:32         ` Linus Torvalds
2017-10-12 16:32           ` Linus Torvalds
2017-10-12 16:32           ` Linus Torvalds
2017-10-16  7:38           ` Christoph Hellwig
2017-10-16  7:38             ` Christoph Hellwig
2017-10-16  7:38             ` Christoph Hellwig
2017-10-16  7:56           ` Jan Kara
2017-10-16  7:56             ` Jan Kara
2017-10-16  7:56             ` Jan Kara
2017-10-12  0:47   ` [PATCH v9 2/6] fs, mm: pass fd to ->mmap_validate() Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
     [not found]     ` <150776923838.9144.15727770472447035032.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-12  1:21       ` Al Viro
2017-10-12  1:21         ` Al Viro
2017-10-12  1:21         ` Al Viro
2017-10-12  1:21         ` Al Viro
     [not found]         ` <20171012012131.GD21978-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2017-10-12  1:28           ` Dan Williams
2017-10-12  1:28             ` Dan Williams
2017-10-12  1:28             ` Dan Williams
2017-10-12  1:28             ` Dan Williams
     [not found]             ` <CAPcyv4jr4atxCqFW_337Sguu8LswVgjsJVOd65n4RODttX9cxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-12  2:17               ` Dan Williams
2017-10-12  2:17                 ` Dan Williams
2017-10-12  2:17                 ` Dan Williams
2017-10-12  2:17                 ` Dan Williams
     [not found]                 ` <CAPcyv4ij9E9tXPLqp6cUAY3dJzh7OS+yPsVDME50xSvQPLpStA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-12  3:44                   ` Dan Williams
2017-10-12  3:44                     ` Dan Williams
2017-10-12  3:44                     ` Dan Williams
2017-10-12  3:44                     ` Dan Williams
2017-10-12  0:47   ` [PATCH v9 3/6] fs: MAP_DIRECT core Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47   ` [PATCH v9 4/6] xfs: prepare xfs_break_layouts() for reuse with MAP_DIRECT Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47   ` [PATCH v9 5/6] fs, xfs, iomap: introduce break_layout_nowait() Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47   ` [PATCH v9 6/6] xfs: wire up MAP_DIRECT Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12  0:47     ` Dan Williams
2017-10-12 14:23   ` [PATCH v9 0/6] MAP_DIRECT for DAX userspace flush Christoph Hellwig
2017-10-12 14:23     ` Christoph Hellwig
2017-10-12 14:23     ` Christoph Hellwig
2017-10-12 17:41     ` Dan Williams
2017-10-12 17:41       ` Dan Williams
2017-10-12 17:41       ` Dan Williams
2017-10-13  6:57       ` Christoph Hellwig
2017-10-13  6:57         ` Christoph Hellwig
2017-10-13  6:57         ` Christoph Hellwig
     [not found]         ` <20171013065716.GB26461-jcswGhMUV9g@public.gmane.org>
2017-10-13 15:14           ` Dan Williams
2017-10-13 15:14             ` Dan Williams
2017-10-13 15:14             ` Dan Williams
     [not found]             ` <CAPcyv4gaLBBefOU+8f7_ypYnCTjSMk+9nq8NfCqBHAE+NbUusw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-13 16:38               ` Jason Gunthorpe
2017-10-13 16:38                 ` Jason Gunthorpe
2017-10-13 16:38                 ` Jason Gunthorpe
2017-10-13 16:38                 ` Jason Gunthorpe
     [not found]                 ` <20171013163822.GA17411-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-13 17:01                   ` Dan Williams
2017-10-13 17:01                     ` Dan Williams
2017-10-13 17:01                     ` Dan Williams
2017-10-13 17:01                     ` Dan Williams
     [not found]                     ` <CAPcyv4jDHp8z2VgVfyRK1WwMzixYVQnh54LZoPD57HB3yqSPPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-13 17:31                       ` Jason Gunthorpe
2017-10-13 17:31                         ` Jason Gunthorpe
2017-10-13 17:31                         ` Jason Gunthorpe
2017-10-13 17:31                         ` Jason Gunthorpe
     [not found]                         ` <20171013173145.GA18702-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-13 18:22                           ` Dan Williams
2017-10-13 18:22                             ` Dan Williams
2017-10-13 18:22                             ` Dan Williams
2017-10-13 18:22                             ` Dan Williams
     [not found]                             ` <CAPcyv4jZJRto1jwmNU--pqH_6dOVMyj=68ZwEjAmmkgX=mRk7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-14  1:57                               ` Jason Gunthorpe
2017-10-14  1:57                                 ` Jason Gunthorpe
2017-10-14  1:57                                 ` Jason Gunthorpe
2017-10-14  1:57                                 ` Jason Gunthorpe
2017-10-16 12:02                                 ` Sagi Grimberg
2017-10-16 12:02                                   ` Sagi Grimberg
     [not found]                                   ` <e29eb9ed-2d87-cde8-4efa-50de1fff0c04-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-10-19  6:02                                     ` Jason Gunthorpe
2017-10-19  6:02                                       ` Jason Gunthorpe
2017-10-19  6:02                                       ` Jason Gunthorpe
2017-10-19  6:02                                       ` Jason Gunthorpe
2017-10-16  7:30                               ` Christoph Hellwig
2017-10-16  7:30                                 ` Christoph Hellwig
2017-10-16  7:30                                 ` Christoph Hellwig
2017-10-16  7:26                           ` Christoph Hellwig
2017-10-16  7:26                             ` Christoph Hellwig
2017-10-16  7:26                             ` Christoph Hellwig
     [not found]                             ` <20171016072644.GB28270-jcswGhMUV9g@public.gmane.org>
2017-10-16 12:07                               ` Sagi Grimberg
2017-10-16 12:07                                 ` Sagi Grimberg
2017-10-16 12:07                                 ` Sagi Grimberg
2017-10-16 17:43                               ` Dan Williams
2017-10-16 17:43                                 ` Dan Williams
2017-10-16 17:43                                 ` Dan Williams
2017-10-16 19:44                                 ` Dan Williams
2017-10-16 19:44                                   ` Dan Williams
2017-10-16 19:44                                   ` Dan Williams
     [not found]                                   ` <CAPcyv4gtnZu7obG7UwaBq1-fwRZj06HCa=mjBfDKKgfp97nYaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-17  6:46                                     ` Christoph Hellwig [this message]
2017-10-17  6:46                                       ` Christoph Hellwig
2017-10-17  6:46                                       ` Christoph Hellwig
2017-10-17  6:46                                       ` Christoph Hellwig
2017-10-16  7:22                   ` Christoph Hellwig
2017-10-16  7:22                     ` Christoph Hellwig
2017-10-16  7:22                     ` Christoph Hellwig
2017-10-16  7:22                     ` 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=20171017064647.GA15437@lst.de \
    --to=hch-jcswghmuv9g@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=darrick.wong-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org \
    --cc=jack-AlSwsSmVLrQ@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org \
    --cc=jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.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.