From: Jane Chu <jane.chu@oracle.com>
To: dan.j.williams@intel.com, bp@alien8.de, hch@infradead.org,
dave.hansen@intel.com, peterz@infradead.org, luto@kernel.org,
david@fromorbit.com, djwong@kernel.org,
linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev,
linux-kernel@vger.kernel.org, x86@kernel.org
Cc: vishal.l.verma@intel.com, dave.jiang@intel.com, agk@redhat.com,
snitzer@redhat.com, dm-devel@redhat.com, ira.weiny@intel.com,
willy@infradead.org, vgoyal@redhat.com
Subject: [PATCH v8 0/7] DAX poison recovery
Date: Tue, 19 Apr 2022 20:04:28 -0600 [thread overview]
Message-ID: <20220420020435.90326-1-jane.chu@oracle.com> (raw)
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:
v7 -> v8:
- add a patch to teach the nfit driver to rely on mce->misc for poison
granularity, suggested by Dan
- add set_memory_present() helper to be invoked by set_mce_nospec() for
better readibility, suggested by Dan
- folded a trivial fix to comments in patch 2/NN, suggested by Boris,
and more commit message comments from Boris
- mode .recovery_write to dax_operation as dev_pagemap_ops is meant for
device agnostic operations, suggested by Christoph
- replace DAX_RECOVERY flag with enum dax_access_mode suggested by Dan
- re-organized __pmem_direct_access as provided by Christoph
- split [PATCH v7 4/6] into two patches: one introduces
DAX_RECOVERY_WRITE, and the other introduces .recovery_write operation
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 (7):
acpi/nfit: rely on mce->misc to determine poison granularity
x86/mce: relocate set{clear}_mce_nospec() functions
mce: fix set_mce_nospec to always unmap the whole page
dax: introduce DAX_RECOVERY_WRITE dax access mode
dax: add .recovery_write dax_operation
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 | 48 ++++++-
drivers/acpi/nfit/mce.c | 4 +-
drivers/dax/super.c | 14 +-
drivers/md/dm-linear.c | 15 ++-
drivers/md/dm-log-writes.c | 15 ++-
drivers/md/dm-stripe.c | 15 ++-
drivers/md/dm-target.c | 4 +-
drivers/md/dm-writecache.c | 7 +-
drivers/md/dm.c | 25 +++-
drivers/nvdimm/pmem.c | 207 +++++++++++++++++++++---------
drivers/nvdimm/pmem.h | 6 +-
drivers/s390/block/dcssblk.c | 9 +-
fs/dax.c | 22 +++-
fs/fuse/dax.c | 4 +-
include/linux/dax.h | 22 +++-
include/linux/device-mapper.h | 13 +-
include/linux/set_memory.h | 10 +-
tools/testing/nvdimm/pmem-dax.c | 3 +-
20 files changed, 351 insertions(+), 150 deletions(-)
base-commit: 028192fea1de083f4f12bfb1eb7c4d7beb5c8ecd
--
2.18.4
next reply other threads:[~2022-04-20 2:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 2:04 Jane Chu [this message]
2022-04-20 2:04 ` [PATCH v8 1/7] acpi/nfit: rely on mce->misc to determine poison granularity Jane Chu
2022-04-21 19:25 ` Dan Williams
2022-04-20 2:04 ` [PATCH v8 2/7] x86/mce: relocate set{clear}_mce_nospec() functions Jane Chu
2022-04-21 6:50 ` Christoph Hellwig
2022-04-22 3:46 ` Jane Chu
2022-04-20 2:04 ` [PATCH v8 3/7] mce: fix set_mce_nospec to always unmap the whole page Jane Chu
2022-04-21 6:51 ` Christoph Hellwig
2022-04-22 3:47 ` Jane Chu
2022-04-21 19:26 ` Dan Williams
2022-04-20 2:04 ` [PATCH v8 4/7] dax: introduce DAX_RECOVERY_WRITE dax access mode Jane Chu
2022-04-21 6:57 ` Christoph Hellwig
2022-04-22 4:15 ` Jane Chu
2022-04-21 19:35 ` Dan Williams
2022-04-22 4:15 ` Jane Chu
2022-04-20 2:04 ` [PATCH v8 5/7] dax: add .recovery_write dax_operation Jane Chu
2022-04-21 6:57 ` Christoph Hellwig
2022-04-20 2:04 ` [PATCH v8 6/7] pmem: refactor pmem_clear_poison() Jane Chu
2022-04-20 2:04 ` [PATCH v8 7/7] pmem: implement pmem_recovery_write() Jane Chu
2022-04-20 6:26 ` Dan Williams
2022-04-20 17:01 ` Jane Chu
2022-04-20 17:05 ` Dan Williams
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=20220420020435.90326-1-jane.chu@oracle.com \
--to=jane.chu@oracle.com \
--cc=agk@redhat.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.jiang@intel.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=ira.weiny@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=snitzer@redhat.com \
--cc=vgoyal@redhat.com \
--cc=vishal.l.verma@intel.com \
--cc=willy@infradead.org \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox