* + mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8.patch added to mm-unstable branch
@ 2022-10-26 3:22 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-10-26 3:22 UTC (permalink / raw)
To: mm-commits, songmuchun, shy828301, osalvador, mike.kravetz,
linmiaohe, jane.chu, david, naoya.horiguchi, akpm
The patch titled
Subject: mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8
has been added to the -mm mm-unstable branch. Its filename is
mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Naoya Horiguchi <naoya.horiguchi@linux.dev>
Subject: mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8
Date: Tue, 25 Oct 2022 14:35:59 +0900
remove TestClearHPageMigratable and reduce to test and clear separately
Link: https://lkml.kernel.org/r/20221025053559.GA2104800@ik1-406-35019.vs.sakura.ne.jp
Signed-off-by: Naoya Horiguchi <naoya.horiguchi@linux.dev>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jane Chu <jane.chu@oracle.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/include/linux/hugetlb.h~mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8
+++ a/include/linux/hugetlb.h
@@ -623,10 +623,6 @@ void folio_clear_hugetlb_##flname(struct
} \
static inline void ClearHPage##uname(struct page *page) \
{ clear_bit(HPG_##flname, &(page->private)); }
-
-#define TESTCLEARHPAGEFLAG(uname, flname) \
-static inline int TestClearHPage##uname(struct page *page) \
- { return test_and_clear_bit(HPG_##flname, &(page->private)); }
#else
#define TESTHPAGEFLAG(uname, flname) \
static inline bool \
@@ -648,10 +644,6 @@ folio_clear_hugetlb_##flname(struct foli
{ } \
static inline void ClearHPage##uname(struct page *page) \
{ }
-
-#define TESTCLEARHPAGEFLAG(uname, flname) \
-static inline int TestClearHPage##uname(struct page *page) \
- { return 0; }
#endif
#define HPAGEFLAG(uname, flname) \
@@ -664,7 +656,6 @@ static inline int TestClearHPage##uname(
*/
HPAGEFLAG(RestoreReserve, restore_reserve)
HPAGEFLAG(Migratable, migratable)
- TESTCLEARHPAGEFLAG(Migratable, migratable)
HPAGEFLAG(Temporary, temporary)
HPAGEFLAG(Freed, freed)
HPAGEFLAG(VmemmapOptimized, vmemmap_optimized)
--- a/mm/memory-failure.c~mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8
+++ a/mm/memory-failure.c
@@ -1823,8 +1823,10 @@ int __get_huge_page_for_hwpoison(unsigne
* Clearing HPageMigratable for hwpoisoned hugepages to prevent them
* from being migrated by memory hotremove.
*/
- if (count_increased)
- *migratable_cleared = TestClearHPageMigratable(head);
+ if (count_increased && HPageMigratable(head)) {
+ ClearHPageMigratable(head);
+ *migratable_cleared = true;
+ }
return ret;
out:
_
Patches currently in -mm which might be from naoya.horiguchi@linux.dev are
mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-26 3:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-26 3:22 + mmhwpoisonhugetlbmemory_hotplug-hotremove-memory-section-with-hwpoisoned-hugepage-v8.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.