linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] vfio, dax: prevent long term filesystem-dax pins and other fixes
@ 2018-02-23  7:17 Dan Williams
  2018-02-23  7:17 ` [PATCH v2 1/5] dax: fix vma_is_fsdax() helper Dan Williams
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Dan Williams @ 2018-02-23  7:17 UTC (permalink / raw)
  To: linux-nvdimm
  Cc: Haozhong Zhang, Michal Hocko, Jan Kara, kvm, linux-kernel,
	stable, linux-mm, Alex Williamson, Gerd Rausch, Alexander Viro,
	linux-fsdevel, kbuild test robot, Christoph Hellwig

Changes since v1 [1]:

* Fix the detection of device-dax file instances in vma_is_fsdax().
  (Haozhong, Gerd)

* Fix compile breakage in the FS_DAX=n and DEV_DAX=y case. (0day robot)

[1]: https://lists.01.org/pipermail/linux-nvdimm/2018-February/014046.html

---

The vfio interface, like RDMA, wants to setup long term (indefinite)
pins of the pages backing an address range so that a guest or userspace
driver can perform DMA to the with physical address. Given that this
pinning may lead to filesystem operations deadlocking in the
filesystem-dax case, the pinning request needs to be rejected.

The longer term fix for vfio, RDMA, and any other long term pin user, is
to provide a 'pin with lease' mechanism. Similar to the leases that are
hold for pNFS RDMA layouts, this userspace lease gives the kernel a way
to notify userspace that the block layout of the file is changing and
the kernel is revoking access to pinned pages.

---

Dan Williams (5):
      dax: fix vma_is_fsdax() helper
      dax: fix dax_mapping() definition in the FS_DAX=n + DEV_DAX=y case
      dax: fix S_DAX definition
      dax: short circuit vma_is_fsdax() in the CONFIG_FS_DAX=n case
      vfio: disable filesystem-dax page pinning


 drivers/vfio/vfio_iommu_type1.c |   18 +++++++++++++++---
 include/linux/dax.h             |    9 ++++++---
 include/linux/fs.h              |    6 ++++--
 3 files changed, 25 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-26  9:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23  7:17 [PATCH v2 0/5] vfio, dax: prevent long term filesystem-dax pins and other fixes Dan Williams
2018-02-23  7:17 ` [PATCH v2 1/5] dax: fix vma_is_fsdax() helper Dan Williams
2018-02-23  7:17 ` [PATCH v2 2/5] dax: fix dax_mapping() definition in the FS_DAX=n + DEV_DAX=y case Dan Williams
2018-02-26  9:44   ` Jan Kara
2018-02-23  7:17 ` [PATCH v2 3/5] dax: fix S_DAX definition Dan Williams
2018-02-26  9:43   ` Jan Kara
2018-02-23  7:18 ` [PATCH v2 4/5] dax: short circuit vma_is_fsdax() in the CONFIG_FS_DAX=n case Dan Williams
2018-02-23  7:18 ` [PATCH v2 5/5] vfio: disable filesystem-dax page pinning Dan Williams
2018-02-23  8:55 ` [PATCH v2 0/5] vfio, dax: prevent long term filesystem-dax pins and other fixes Haozhong Zhang
2018-02-23 16:56   ` Dan Williams

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).