linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v11 0/2] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind
@ 2023-03-28  9:41 Shiyang Ruan
  2023-03-28  9:41 ` [PATCH v11 1/2] xfs: fix the calculation of length and end Shiyang Ruan
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Shiyang Ruan @ 2023-03-28  9:41 UTC (permalink / raw)
  To: linux-fsdevel, nvdimm, linux-xfs, linux-mm
  Cc: dan.j.williams, willy, jack, akpm, djwong

This patchset is to add gracefully unbind support for pmem.
Patch1 corrects the calculation of length and end of a given range.
Patch2 introduces a new flag call MF_MEM_REMOVE, to let dax holder know
it is a remove event.  With the help of notify_failure mechanism, we are
able to shutdown the filesystem on the pmem gracefully.

Changes since v10:
 Patch1:
  1. correct the count calculation in xfs_failure_pgcnt().
 Patch2:
  2. drop the patch which introduces super_drop_pagecache().
  3. in mf_dax_kill_procs(), don't SetPageHWPoison() and search for all
      tasks while mf_flags has MF_MEM_PRE_REMOVE.
  4. only do mf_dax_kill_procs() on dax mapping.
  5. do invalidate_inode_pages2_range() for each file found during rmap,
      to make sure the dax entry are disassociated before pmem is gone.
      Otherwise, umount filesystem after unbind will cause crash because
      the dax entries have to be disassociated but now the pmem is not
      exist.

  For detail analysis of this change, please refer this link[1].

[1] https://lore.kernel.org/linux-xfs/b1d9fc03-1a71-a75f-f87b-5819991e4eb2@fujitsu.com/

Shiyang Ruan (2):
  xfs: fix the calculation of length and end
  mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind

 drivers/dax/super.c         |  3 +-
 fs/xfs/xfs_notify_failure.c | 66 +++++++++++++++++++++++++++++++------
 include/linux/mm.h          |  1 +
 mm/memory-failure.c         | 17 +++++++---
 4 files changed, 72 insertions(+), 15 deletions(-)

-- 
2.39.2



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

end of thread, other threads:[~2023-04-26  2:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28  9:41 [PATCH v11 0/2] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind Shiyang Ruan
2023-03-28  9:41 ` [PATCH v11 1/2] xfs: fix the calculation of length and end Shiyang Ruan
2023-03-28  9:41 ` [PATCH v11 2/2] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind Shiyang Ruan
2023-04-04 17:45   ` Darrick J. Wong
2023-04-05  1:28     ` Yasunori Gotou (Fujitsu)
2023-04-05  4:36     ` Dan Williams
2023-04-06 10:50     ` Shiyang Ruan
2023-04-06 14:54       ` Darrick J. Wong
2023-04-07  2:07         ` Shiyang Ruan
2023-04-12 10:52   ` [RFC PATCH v11.1 " Shiyang Ruan
2023-04-20  2:07     ` Shiyang Ruan
2023-04-20 12:09       ` Jan Kara
2023-04-25 12:47         ` Shiyang Ruan
2023-04-25 13:23           ` Jan Kara
2023-04-25 15:18             ` Darrick J. Wong
2023-04-26  2:27               ` Shiyang Ruan
2023-04-26  2:37                 ` Darrick J. Wong
2023-04-04  4:33 ` [PATCH v11 0/2] " Shiyang Ruan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox