Skip to content

Commit 6f46148

Browse files
nhoriguchiakpm00
authored andcommitted
mm, hwpoison: enable memory error handling on 1GB hugepage
Now error handling code is prepared, so remove the blocking code and enable memory error handling on 1GB hugepage. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Naoya Horiguchi <[email protected]> Reviewed-by: Miaohe Lin <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: kernel test robot <[email protected]> Cc: Liu Shixin <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Muchun Song <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: Yang Shi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent ceaf8fb commit 6f46148

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

include/linux/mm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3229,7 +3229,6 @@ enum mf_action_page_type {
32293229
MF_MSG_DIFFERENT_COMPOUND,
32303230
MF_MSG_HUGE,
32313231
MF_MSG_FREE_HUGE,
3232-
MF_MSG_NON_PMD_HUGE,
32333232
MF_MSG_UNMAP_FAILED,
32343233
MF_MSG_DIRTY_SWAPCACHE,
32353234
MF_MSG_CLEAN_SWAPCACHE,

include/ras/ras_event.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ TRACE_EVENT(aer_event,
360360
EM ( MF_MSG_DIFFERENT_COMPOUND, "different compound page after locking" ) \
361361
EM ( MF_MSG_HUGE, "huge page" ) \
362362
EM ( MF_MSG_FREE_HUGE, "free huge page" ) \
363-
EM ( MF_MSG_NON_PMD_HUGE, "non-pmd-sized huge page" ) \
364363
EM ( MF_MSG_UNMAP_FAILED, "unmapping failed page" ) \
365364
EM ( MF_MSG_DIRTY_SWAPCACHE, "dirty swapcache page" ) \
366365
EM ( MF_MSG_CLEAN_SWAPCACHE, "clean swapcache page" ) \

mm/memory-failure.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ static const char * const action_page_types[] = {
768768
[MF_MSG_DIFFERENT_COMPOUND] = "different compound page after locking",
769769
[MF_MSG_HUGE] = "huge page",
770770
[MF_MSG_FREE_HUGE] = "free huge page",
771-
[MF_MSG_NON_PMD_HUGE] = "non-pmd-sized huge page",
772771
[MF_MSG_UNMAP_FAILED] = "unmapping failed page",
773772
[MF_MSG_DIRTY_SWAPCACHE] = "dirty swapcache page",
774773
[MF_MSG_CLEAN_SWAPCACHE] = "clean swapcache page",
@@ -1885,21 +1884,6 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb
18851884

18861885
page_flags = head->flags;
18871886

1888-
/*
1889-
* TODO: hwpoison for pud-sized hugetlb doesn't work right now, so
1890-
* simply disable it. In order to make it work properly, we need
1891-
* make sure that:
1892-
* - conversion of a pud that maps an error hugetlb into hwpoison
1893-
* entry properly works, and
1894-
* - other mm code walking over page table is aware of pud-aligned
1895-
* hwpoison entries.
1896-
*/
1897-
if (huge_page_size(page_hstate(head)) > PMD_SIZE) {
1898-
action_result(pfn, MF_MSG_NON_PMD_HUGE, MF_IGNORED);
1899-
res = -EBUSY;
1900-
goto out;
1901-
}
1902-
19031887
if (!hwpoison_user_mappings(p, pfn, flags, head)) {
19041888
action_result(pfn, MF_MSG_UNMAP_FAILED, MF_IGNORED);
19051889
res = -EBUSY;

0 commit comments

Comments
 (0)