The patch titled Subject: memory-hotplug: update mce_bad_pages when removing the memory has been removed from the -mm tree. Its filename was memory-hotplug-update-mce_bad_pages-when-removing-the-memory.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Wen Congyang <wency@xxxxxxxxxxxxxx> Subject: memory-hotplug: update mce_bad_pages when removing the memory When we hotremove a memory device, we will free the memory to store struct page. If the page is hwpoisoned page, we should decrease mce_bad_pages. [akpm@xxxxxxxxxxxxxxxxxxxx: cleanup ifdefs] Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Jiang Liu <liuj97@xxxxxxxxx> Cc: Len Brown <len.brown@xxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Cc: Dave Hansen <dave@xxxxxxxxxxxxxxxxxx> Cc: Mel Gorman <mel@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/sparse.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff -puN mm/sparse.c~memory-hotplug-update-mce_bad_pages-when-removing-the-memory mm/sparse.c --- a/mm/sparse.c~memory-hotplug-update-mce_bad_pages-when-removing-the-memory +++ a/mm/sparse.c @@ -771,6 +771,27 @@ out: return ret; } +#ifdef CONFIG_MEMORY_FAILURE +static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) +{ + int i; + + if (!memmap) + return; + + for (i = 0; i < PAGES_PER_SECTION; i++) { + if (PageHWPoison(&memmap[i])) { + atomic_long_sub(1, &mce_bad_pages); + ClearPageHWPoison(&memmap[i]); + } + } +} +#else +static inline void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) +{ +} +#endif + void sparse_remove_one_section(struct zone *zone, struct mem_section *ms) { struct page *memmap = NULL; @@ -784,6 +805,7 @@ void sparse_remove_one_section(struct zo ms->pageblock_flags = NULL; } + clear_hwpoisoned_pages(memmap, PAGES_PER_SECTION); free_section_usemap(memmap, usemap); } #endif _ Patches currently in -mm which might be from wency@xxxxxxxxxxxxxx are origin.patch node_states-introduce-n_memory.patch cpuset-use-n_memory-instead-n_high_memory.patch procfs-use-n_memory-instead-n_high_memory.patch memcontrol-use-n_memory-instead-n_high_memory.patch oom-use-n_memory-instead-n_high_memory.patch mmmigrate-use-n_memory-instead-n_high_memory.patch mempolicy-use-n_memory-instead-n_high_memory.patch hugetlb-use-n_memory-instead-n_high_memory.patch vmstat-use-n_memory-instead-n_high_memory.patch kthread-use-n_memory-instead-n_high_memory.patch init-use-n_memory-instead-n_high_memory.patch vmscan-use-n_memory-instead-n_high_memory.patch page_alloc-use-n_memory-instead-n_high_memory-change-the-node_states-initialization.patch hotplug-update-nodemasks-management.patch hotplug-update-nodemasks-management-fix.patch numa-add-config_movable_node-for-movable-dedicated-node.patch numa-add-config_movable_node-for-movable-dedicated-node-fix.patch memory_hotplug-allow-online-offline-memory-to-result-movable-node.patch mm-introduce-new-field-managed_pages-to-struct-zone.patch mm-provide-more-accurate-estimation-of-pages-occupied-by-memmap.patch mm-provide-more-accurate-estimation-of-pages-occupied-by-memmap-fix.patch linux-next.patch x86-numa-dont-check-if-node-is-numa_no_node.patch x86-fix-the-argument-passed-to-sync_global_pgds.patch x86-make-mem=-option-to-work-for-efi-platform.patch documentation-kernel-parameterstxt-update-mem=-options-spec-according-to-its-implementation.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html