The patch titled Subject: mmhwpoison-rework-soft-offline-for-in-use-pages-fix has been added to the -mm tree. Its filename is mmhwpoison-rework-soft-offline-for-in-use-pages-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mmhwpoison-rework-soft-offline-for-in-use-pages-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mmhwpoison-rework-soft-offline-for-in-use-pages-fix.patch 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 and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mmhwpoison-rework-soft-offline-for-in-use-pages-fix fix build ../mm/hugetlb.c:1302:20: error: redefinition of `destroy_compound_gigantic_page' static inline void destroy_compound_gigantic_page(struct hstate *h, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../mm/hugetlb.c:1223:13: note: previous definition of `destroy_compound_gigantic_page' was here static void destroy_compound_gigantic_page(struct hstate *h, struct page *page, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link: http://lkml.kernel.org/r/267a50e8-b7b2-b095-d62e-6e95313bc4c2@xxxxxxxxxxxxx Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Cc: Naoya Horiguchi <naoya.horiguchi@xxxxxxx> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 51 +++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) --- a/mm/hugetlb.c~mmhwpoison-rework-soft-offline-for-in-use-pages-fix +++ a/mm/hugetlb.c @@ -1231,30 +1231,6 @@ static inline void ClearPageHugePoisoned page[3].mapping = NULL; } -static void destroy_compound_gigantic_page(struct hstate *h, struct page *page, - unsigned int order) -{ - int i; - int nr_pages = 1 << order; - struct page *p = page + 1; - - atomic_set(compound_mapcount_ptr(page), 0); - if (hpage_pincount_available(page)) - atomic_set(compound_pincount_ptr(page), 0); - - for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) { - if (!hstate_is_gigantic(h)) - p->mapping = NULL; - clear_compound_head(p); - set_page_refcounted(p); - } - - if (PageHugePoisoned(page)) - ClearPageHugePoisoned(page); - set_compound_order(page, 0); - __ClearPageHead(page); -} - #ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE static void free_gigantic_page(struct page *page, unsigned int order) { @@ -1310,11 +1286,32 @@ static struct page *alloc_gigantic_page( return NULL; } static inline void free_gigantic_page(struct page *page, unsigned int order) { } -static inline void destroy_compound_gigantic_page(struct hstate *h, - struct page *page, - unsigned int order) { } #endif +static void destroy_compound_gigantic_page(struct hstate *h, struct page *page, + unsigned int order) +{ + int i; + int nr_pages = 1 << order; + struct page *p = page + 1; + + atomic_set(compound_mapcount_ptr(page), 0); + if (hpage_pincount_available(page)) + atomic_set(compound_pincount_ptr(page), 0); + + for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) { + if (!hstate_is_gigantic(h)) + p->mapping = NULL; + clear_compound_head(p); + set_page_refcounted(p); + } + + if (PageHugePoisoned(page)) + ClearPageHugePoisoned(page); + set_compound_order(page, 0); + __ClearPageHead(page); +} + static void update_and_free_page(struct hstate *h, struct page *page) { int i; _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are mm-close-race-between-munmap-and-expand_upwards-downwards-fix.patch mm-hugetlb-avoid-hardcoding-while-checking-if-cma-is-enabled-fix.patch mm.patch mm-handle-page-mapping-better-in-dump_page-fix.patch mm-memcg-percpu-account-percpu-memory-to-memory-cgroups-fix.patch mm-memcg-percpu-account-percpu-memory-to-memory-cgroups-fix-fix.patch mm-thp-replace-http-links-with-https-ones-fix.patch mm-vmstat-add-events-for-thp-migration-without-split-fix.patch mmhwpoison-rework-soft-offline-for-in-use-pages-fix.patch linux-next-rejects.patch linux-next-git-rejects.patch mm-migrate-clear-__gfp_reclaim-to-make-the-migration-callback-consistent-with-regular-thp-allocations-fix.patch mm-madvise-introduce-process_madvise-syscall-an-external-memory-hinting-api-fix.patch mm-madvise-introduce-process_madvise-syscall-an-external-memory-hinting-api-fix-2.patch kernel-forkc-export-kernel_thread-to-modules.patch