mbox series

[v1,0/6] mm/hwpoison: fix unpoison_memory()

Message ID 20210614021212.223326-1-nao.horiguchi@gmail.com (mailing list archive)
Headers show
Series mm/hwpoison: fix unpoison_memory() | expand


Naoya Horiguchi June 14, 2021, 2:12 a.m. UTC

This patchset is suggesting to adjust unpoison_memory() to the new way of
isolation and refcounting of hwpoisoned pages.

As mentioned in [1], NR_FREE_PAGES is incremented via newly added function
undoing take_page_off_buddy(), so the counter is consistent with this series.

It depends on some other hwpoison-related patches (not mainlined but in linux-mm),
so I listed the dependencies here:

  - mm/hwpoison: do not lock page again when me_huge_page() successfully recovers
  - mm/memory-failure: make sure wait for page writeback in memory_failure
  - mm,hwpoison: make get_hwpoison_page() call get_any_page()
  - mm,hwpoison: fix race with hugetlb page allocation
  - mm,hwpoison: Send SIGBUS with error virutal address
  - mm,hwpoison: Return -EHWPOISON to denote that the page has already been poisoned
  - mm/memory-failure: Use a mutex to avoid memory_failure() races

Or GitHub branch I pushed for easy patch access might be helpful for reviewers.

  git fetch https://github.com/nhoriguchi/linux hwpoison

[1] https://lore.kernel.org/linux-mm/20210527003436.GA3543069@hori.linux.bs1.fc.nec.co.jp/

Naoya Horiguchi

Naoya Horiguchi (6):
      mm/hwpoison: mf_mutex for soft offline and unpoison
      mm/hwpoison: remove race consideration
      mm/hwpoison: introduce MF_MSG_PAGETABLE
      mm/hwpoison: remove MF_MSG_BUDDY_2ND and MF_MSG_POISONED_HUGE
      mm/hwpoison: make some kernel pages handlable
      mm/hwpoison: fix unpoison_memory()

 include/linux/mm.h         |   4 +-
 include/linux/page-flags.h |   4 ++
 include/ras/ras_event.h    |   3 +-
 mm/memory-failure.c        | 176 +++++++++++++++++++++++++--------------------
 mm/page_alloc.c            |  19 +++++
 5 files changed, 126 insertions(+), 80 deletions(-)