lkml.org 
[lkml]   [2018]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[GIT PULL] libnvdimm fixes for 4.16-rc4
Date
Hi Linus, please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

...to receive a 4.16 regression fix, 3 fixes for -stable, and a cleanup
fix.

* During the merge window support for the new ACPI NVDIMM Platform
Capabilities structure disabled support for "deep flush", a force-unit-
access like mechanism for persistent memory. Restore that mechanism.

* VFIO like RDMA is yet one more memory registration / pinning
interface that is incompatible with Filesystem-DAX. Disable long term
pins of Filesystem-DAX mappings via VFIO.

* The Filesystem-DAX detection to prevent long terms pins mistakenly
also disabled Device-DAX pins which are not subject to the same block-
map collision concerns.

* Similar to the setup path, softlockup warnings can trigger in the
shutdown path for large persistent memory namespaces. Teach
for_each_device_pfn() to perform cond_resched() in all cases.

* Boaz noticed that the might_sleep() in dax_direct_access() is stale
as of the v4.15 kernel.

These have received a build success notification from the 0day robot,
and the longterm pin fixes have appeared in -next. However, I recently
rebased the tree to remove some other fixes that need to be reworked
after review feedback.

---

The following changes since commit 91ab883eb21325ad80f3473633f794c78ac87f51:

Linux 4.16-rc2 (2018-02-18 17:29:42 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

for you to fetch changes up to 949b93250a566cc7a578b4f829cf76b70d19a62c:

memremap: fix softlockup reports at teardown (2018-03-02 19:34:50 -0800)

----------------------------------------------------------------
Boaz Harrosh (1):
dax: ->direct_access does not sleep anymore

Dan Williams (3):
dax: fix vma_is_fsdax() helper
vfio: disable filesystem-dax page pinning
memremap: fix softlockup reports at teardown

Dave Jiang (1):
libnvdimm: re-enable deep flush for pmem devices via fsync()

drivers/dax/super.c | 6 ------
drivers/nvdimm/pmem.c | 3 +--
drivers/vfio/vfio_iommu_type1.c | 18 +++++++++++++++---
include/linux/fs.h | 2 +-
kernel/memremap.c | 15 ++++++++++-----
5 files changed, 27 insertions(+), 17 deletions(-)

---

commit 9d4949b4935831be10534d5432bf611285a572a5
Author: Boaz Harrosh <boazh@netapp.com>
Date: Mon Feb 26 18:50:35 2018 +0200

dax: ->direct_access does not sleep anymore

In Patch:
[7a862fb] brd: remove dax support

Dan Williams has removed the only might_sleep
implementation of ->direct_access.
So we no longer need to check for it.

CC: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Boaz Harrosh <boazh@netapp.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

commit 230f5a8969d8345fc9bbe3683f068246cf1be4b8
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Feb 21 17:08:01 2018 -0800

dax: fix vma_is_fsdax() helper

Gerd reports that ->i_mode may contain other bits besides S_IFCHR. Use
S_ISCHR() instead. Otherwise, get_user_pages_longterm() may fail on
device-dax instances when those are meant to be explicitly allowed.

Fixes: 2bb6d2837083 ("mm: introduce get_user_pages_longterm")
Cc: <stable@vger.kernel.org>
Reported-by: Gerd Rausch <gerd.rausch@oracle.com>
Acked-by: Jane Chu <jane.chu@oracle.com>
Reported-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

commit 94db151dc89262bfa82922c44e8320cea2334667
Author: Dan Williams <dan.j.williams@intel.com>
Date: Sun Feb 4 10:34:02 2018 -0800

vfio: disable filesystem-dax page pinning

Filesystem-DAX is incompatible with 'longterm' page pinning. Without
page cache indirection a DAX mapping maps filesystem blocks directly.
This means that the filesystem must not modify a file's block map while
any page in a mapping is pinned. In order to prevent the situation of
userspace holding of filesystem operations indefinitely, disallow
'longterm' Filesystem-DAX mappings.

RDMA has the same conflict and the plan there is to add a 'with lease'
mechanism to allow the kernel to notify userspace that the mapping is
being torn down for block-map maintenance. Perhaps something similar can
be put in place for vfio.

Note that xfs and ext4 still report:

"DAX enabled. Warning: EXPERIMENTAL, use at your own risk"

...at mount time, and resolving the dax-dma-vs-truncate problem is one
of the last hurdles to remove that designation.

Acked-by: Alex Williamson <alex.williamson@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: kvm@vger.kernel.org
Cc: <stable@vger.kernel.org>
Reported-by: Haozhong Zhang <haozhong.zhang@intel.com>
Tested-by: Haozhong Zhang <haozhong.zhang@intel.com>
Fixes: d475c6346a38 ("dax,ext2: replace XIP read and write with DAX I/O")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

commit 5fdf8e5ba5666fe153bd61f851a40078a6347822
Author: Dave Jiang <dave.jiang@intel.com>
Date: Fri Mar 2 19:31:40 2018 -0800

libnvdimm: re-enable deep flush for pmem devices via fsync()

Re-enable deep flush so that users always have a way to be sure that a
write makes it all the way out to media. Writes from the PMEM driver
always arrive at the NVDIMM since movnt is used to bypass the cache, and
the driver relies on the ADR (Asynchronous DRAM Refresh) mechanism to
flush write buffers on power failure. The Deep Flush mechanism is there
to explicitly write buffers to protect against (rare) ADR failure. This
change prevents a regression in deep flush behavior so that applications
can continue to depend on fsync() as a mechanism to trigger deep flush
in the filesystem-DAX case.

Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform CPU cache...")
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

commit 949b93250a566cc7a578b4f829cf76b70d19a62c
Author: Dan Williams <dan.j.williams@intel.com>
Date: Tue Feb 6 19:34:11 2018 -0800

memremap: fix softlockup reports at teardown

The cond_resched() currently in the setup path needs to be duplicated in
the teardown path. Rather than require each instance of
for_each_device_pfn() to open code the same sequence, embed it in the
helper.

Link: https://github.com/intel/ixpdimm_sw/issues/11
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: <stable@vger.kernel.org>
Fixes: 71389703839e ("mm, zone_device: Replace {get, put}_zone_device_page()...")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

\
 
 \ /
  Last update: 2018-03-03 21:20    [W:0.066 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site