Skip to content

HWPOISON: soft offline rework

Oscar Salvador linux-mm lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest14 patches 12 repliesIn review 12 of 14 applied
  2. v415 patches 6 repliesSuperseded
  3. v2 RFC16 patches 40 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v110 patches15 repliesSuperseded

Patches in v7 12 of 14 applied

#Subject and filesSizeRepliesApplied
1/14mm,hwpoison: cleanup unused PageHuge() checkmm/memory-failure.c+1 -40 replies
2/14mm, hwpoison: remove recalculating hpagemm/memory-failure.c+1 -50 repliesApplied
3/14mm,hwpoison-inject: don't pin for hwpoison_filtermm/hwpoison-inject.c+5 -130 repliesApplied
4/14mm,hwpoison: unexport get_hwpoison_page and make it staticinclude/linux/mm.h mm/memory-failure.c+1 -31 replyApplied
5/14mm,hwpoison: refactor madvise_inject_errormm/madvise.c+14 -161 reply
6/14mm,hwpoison: kill put_hwpoison_pageinclude/linux/mm.h mm/memory-failure.c+15 -161 replyApplied
7/14mm,hwpoison: unify THP handling for hard and soft offlinemm/memory-failure.c+22 -261 replyApplied
8/14mm,hwpoison: rework soft offline for free pagesinclude/linux/page-flags.h mm/memory-failure.c mm/page_alloc.c+81 -61 replyApplied
9/14mm,hwpoison: rework soft offline for in-use pagesinclude/linux/page-flags.h mm/memory-failure.c mm/migrate.c +1 more+28 -701 replyApplied
10/14mm,hwpoison: refactor soft_offline_huge_page and __soft_offline_pagemm/memory-failure.c+82 -1001 replyApplied
11/14mm,hwpoison: return 0 if the page is already poisoned in soft-offlinemm/madvise.c mm/memory-failure.c+2 -71 replyApplied
12/14mm,hwpoison: introduce MF_MSG_UNSPLIT_THPinclude/linux/mm.h include/ras/ras_event.h mm/memory-failure.c+8 -10 repliesApplied
13/14mm,hwpoison: double-check page count in __get_any_page()mm/memory-failure.c+6 -00 repliesApplied
14/14mm,hwpoison: Try to narrow window race for free pagesmm/memory-failure.c+6 -11 replyApplied

Reviews trailers per patch

11 of 14 patches have a Reviewed-by or Acked-by.

PatchMike KravetzAristeu RozanskiNaoya Horiguchi
SeriesT-b
1/14R-b
2/14R-b
3/14
4/14A-b
5/14A-b
6/14A-b
7/14A-b
8/14A-b
9/14A-b
10/14A-b
11/14A-b
12/14
13/14
14/14T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 00/14] HWPOISON: soft offline rework

Hi,

This patchset is the latest version of soft offline rework patchset targetted for v5.9.

This patchset fixes a couple of issues that the patchset Naoya sent [1] contained due to rebasing problems and a misunterdansting.

Main focus of this series is to stabilize soft offline. Historically soft offlined pages have suffered from racy conditions because PageHWPoison is used to a little too aggressively, which (directly or indirectly) invades other mm code which cares little about hwpoison. This results in unexpected behavior or kernel panic, which is very far from soft offline's "do not disturb userspace or other kernel component" policy.
An example of this can be found here [2].

Along with several cleanups, this code refactors and changes the way soft offline work.
Main point of this change set is to contain target page "via buddy allocator" or in migrating path.
For ther former we first free the target page as we do for normal pages, and once it has reached buddy and it has been taken off the freelists, we flag it as HWpoison.
For the latter we never get to release the page in unmap_and_move, so the page is under our control and we can handle it in hwpoison code.

[1] https://patchwork.kernel.org/cover/11704083/
[2] https://lore.kernel.org/linux-mm/20190826104144.GA7849@linux/T/#u

Naoya Horiguchi (5):
mm,hwpoison: cleanup unused PageHuge() check mm, hwpoison: remove recalculating hpage mm,hwpoison-inject: don't pin for hwpoison_filter mm,hwpoison: introduce MF_MSG_UNSPLIT_THP mm,hwpoison: double-check page count in __get_any_page()

Oscar Salvador (9):
mm,hwpoison: unexport get_hwpoison_page and make it static mm,hwpoison: refactor madvise_inject_error
mm,hwpoison: kill put_hwpoison_page
mm,hwpoison: unify THP handling for hard and soft offline mm,hwpoison: rework soft offline for free pages mm,hwpoison: rework soft offline for in-use pages mm,hwpoison: refactor soft_offline_huge_page and __soft_offline_page mm,hwpoison: return 0 if the page is already poisoned in soft-offline mm,hwpoison: Try to narrow window race for free pages

 include/linux/mm.h         |   3 +-
 include/linux/page-flags.h |   6 +-
 include/ras/ras_event.h    |   3 +
 mm/hwpoison-inject.c       |  18 +--
 mm/madvise.c               |  35 ++---
 mm/memory-failure.c        | 311 +++++++++++++++++--------------------
 mm/migrate.c               |  11 +-
 mm/page_alloc.c            |  71 +++++++--
 8 files changed, 231 insertions(+), 227 deletions(-)
Signature · 1 line
2.26.2