linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/6] DAX poison recovery
@ 2022-04-05 19:47 Jane Chu
  2022-04-05 19:47 ` [PATCH v7 1/6] x86/mm: fix comment Jane Chu
                   ` (5 more replies)
  0 siblings, 6 replies; 41+ messages in thread
From: Jane Chu @ 2022-04-05 19:47 UTC (permalink / raw)
  To: david, djwong, dan.j.williams, hch, vishal.l.verma, dave.jiang,
	agk, snitzer, dm-devel, ira.weiny, willy, vgoyal, linux-fsdevel,
	nvdimm, linux-kernel, linux-xfs, x86

In this series, dax recovery code path is independent of that of
normal write. Competing dax recovery threads are serialized,
racing read threads are guaranteed not overlapping with the
recovery process.

In this phase, the recovery granularity is page, future patch
will explore recovery in finer granularity.

Changelog:
v6 -> v7:
 . incorporated comments from Christoph, and picked up a reviewed-by
 . add x86@kernel.org per Boris
 . discovered pmem firmware doesn't reliably handle a request to clear
   poison over a large range (such as 2M), hence worked around the
   the feature by limiting the size of the requested range to kernel
   page size. 

v5->v6:
  . per Christoph, move set{clear}_mce_nospec() inline functions out
    of include/linux/set_memory.h and into arch/x86/mm/pat/set_memory.c
    file, so that no need to export _set_memory_present().
  . per Christoph, ratelimit warning message in pmem_do_write()
  . per both Christoph and Dan, switch back to adding a flag to
    dax_direct_access() instead of embedding the flag in kvaddr
  . suggestions from Christoph for improving code structure and
    readability
  . per Dan, add .recovery_write to dev_pagemap.ops instead of adding
    it to dax_operations, such that, the DM layer doesn't need to be
    involved explicitly in dax recoovery write
  . per Dan, is_bad_pmem() takes a seqlock, so no need to place it
    under recovery_lock.
  Many thanks for both reviewers!

v4->v5:
  Fixed build errors reported by kernel test robot

v3->v4:
  Rebased to v5.17-rc1-81-g0280e3c58f92

References:
v4 https://lore.kernel.org/lkml/20220126211116.860012-1-jane.chu@oracle.com/T/
v3 https://lkml.org/lkml/2022/1/11/900
v2 https://lore.kernel.org/all/20211106011638.2613039-1-jane.chu@oracle.com/
Disussions about marking poisoned page as 'np'
https://lore.kernel.org/all/CAPcyv4hrXPb1tASBZUg-GgdVs0OOFKXMXLiHmktg_kFi7YBMyQ@mail.gmail.com/

Jane Chu (6):
  x86/mm: fix comment
  x86/mce: relocate set{clear}_mce_nospec() functions
  mce: fix set_mce_nospec to always unmap the whole page
  dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops
  pmem: refactor pmem_clear_poison()
  pmem: implement pmem_recovery_write()

 arch/x86/include/asm/set_memory.h |  52 -------
 arch/x86/kernel/cpu/mce/core.c    |   6 +-
 arch/x86/mm/pat/set_memory.c      |  43 +++++-
 drivers/dax/super.c               |  17 ++-
 drivers/md/dm-linear.c            |   4 +-
 drivers/md/dm-log-writes.c        |   5 +-
 drivers/md/dm-stripe.c            |   4 +-
 drivers/md/dm-target.c            |   2 +-
 drivers/md/dm-writecache.c        |   5 +-
 drivers/md/dm.c                   |   5 +-
 drivers/nvdimm/pmem.c             | 224 ++++++++++++++++++++++--------
 drivers/nvdimm/pmem.h             |   3 +-
 drivers/s390/block/dcssblk.c      |   4 +-
 fs/dax.c                          |  24 +++-
 fs/fuse/dax.c                     |   4 +-
 include/linux/dax.h               |  11 +-
 include/linux/device-mapper.h     |   2 +-
 include/linux/memremap.h          |   7 +
 include/linux/set_memory.h        |  11 +-
 tools/testing/nvdimm/pmem-dax.c   |   2 +-
 20 files changed, 285 insertions(+), 150 deletions(-)


base-commit: ae085d7f9365de7da27ab5c0d16b12d51ea7fca9
-- 
2.18.4


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

end of thread, other threads:[~2022-04-15 16:19 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 19:47 [PATCH v7 0/6] DAX poison recovery Jane Chu
2022-04-05 19:47 ` [PATCH v7 1/6] x86/mm: fix comment Jane Chu
2022-04-11 22:07   ` Dan Williams
2022-04-12  9:53   ` Borislav Petkov
2022-04-14  1:00     ` Jane Chu
2022-04-14  8:44       ` Borislav Petkov
2022-04-14 21:54         ` Jane Chu
2022-04-05 19:47 ` [PATCH v7 2/6] x86/mce: relocate set{clear}_mce_nospec() functions Jane Chu
2022-04-06  5:01   ` Christoph Hellwig
2022-04-11 22:20   ` Dan Williams
2022-04-14  0:56     ` Jane Chu
2022-04-05 19:47 ` [PATCH v7 3/6] mce: fix set_mce_nospec to always unmap the whole page Jane Chu
2022-04-06  5:02   ` Christoph Hellwig
2022-04-11 23:27   ` Dan Williams
2022-04-13 23:36     ` Jane Chu
2022-04-14  2:32       ` Dan Williams
2022-04-15 16:18         ` Jane Chu
2022-04-12 10:07   ` Borislav Petkov
2022-04-13 23:41     ` Jane Chu
2022-04-05 19:47 ` [PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops Jane Chu
2022-04-06  5:19   ` Christoph Hellwig
2022-04-06 17:32     ` Jane Chu
2022-04-06 17:45       ` Jane Chu
2022-04-07  5:30       ` Christoph Hellwig
2022-04-11 23:55         ` Dan Williams
2022-04-14  0:48           ` Jane Chu
2022-04-14  0:47         ` Jane Chu
2022-04-12  0:08   ` Dan Williams
2022-04-14  0:50     ` Jane Chu
2022-04-12  4:57   ` Dan Williams
2022-04-12  5:02     ` Christoph Hellwig
2022-04-14  0:51       ` Jane Chu
2022-04-05 19:47 ` [PATCH v7 5/6] pmem: refactor pmem_clear_poison() Jane Chu
2022-04-06  5:04   ` Christoph Hellwig
2022-04-06 17:34     ` Jane Chu
2022-04-12  4:26   ` Dan Williams
2022-04-14  0:55     ` Jane Chu
2022-04-14  2:02       ` Dan Williams
2022-04-05 19:47 ` [PATCH v7 6/6] pmem: implement pmem_recovery_write() Jane Chu
2022-04-06  5:21   ` Christoph Hellwig
2022-04-06 17:33     ` Jane Chu

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