Failure after v6.0-rc3-590-gaa3e1ec495ab: mm/hwpoison: move definitions of num_poisoned_pages_* to memory-failure.c:
Results changed to -10 # build_abe binutils: -9 # build_abe stage1: -5 # build_abe qemu: -2 # linux_n_obj: 7357 # First few build errors in logs: # 00:03:28 mm/memory-failure.c:77:20: error: static declaration of ‘num_poisoned_pages_inc’ follows non-static declaration # 00:03:28 make[1]: *** [scripts/Makefile.build:249: mm/memory-failure.o] Error 1 # 00:03:41 make: *** [Makefile:1854: mm] Error 2
from -10 # build_abe binutils: -9 # build_abe stage1: -5 # build_abe qemu: -2 # linux_n_obj: 8335 # linux build successful: all # linux boot successful: boot
THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
For latest status see comments in https://linaro.atlassian.net/browse/GNU-681 . Status of v6.0-rc3-590-gaa3e1ec495ab commit for tcwg_kernel: commit aa3e1ec495ab2fc3f22fc9240ad53a23b21fe0a1 Author: Naoya Horiguchi naoya.horiguchi@nec.com Date: Wed Sep 21 18:13:57 2022 +0900
mm/hwpoison: move definitions of num_poisoned_pages_* to memory-failure.c
These interfaces will be used by drivers/base/core.c by later patch, so as a preparatory work move them to more common header file visible to the file.
Link: https://lkml.kernel.org/r/20220921091359.25889-3-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi naoya.horiguchi@nec.com Cc: David Hildenbrand david@redhat.com Cc: Jane Chu jane.chu@oracle.com Cc: Miaohe Lin linmiaohe@huawei.com Cc: Mike Kravetz mike.kravetz@oracle.com Cc: Muchun Song songmuchun@bytedance.com Cc: Oscar Salvador osalvador@suse.de Cc: Yang Shi shy828301@gmail.com Signed-off-by: Andrew Morton akpm@linux-foundation.org * gnu-release-aarch64-next-defconfig ** Failure after v6.0-rc3-590-gaa3e1ec495ab: mm/hwpoison: move definitions of num_poisoned_pages_* to memory-failure.c: ** https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-release-aarch64-next-def...
Bad build: https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-release-aarch64-next-def... Good build: https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-release-aarch64-next-def...
Reproduce current build: <cut> mkdir -p investigate-linux-aa3e1ec495ab2fc3f22fc9240ad53a23b21fe0a1 cd investigate-linux-aa3e1ec495ab2fc3f22fc9240ad53a23b21fe0a1
# Fetch scripts git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests for bad and good builds mkdir -p bad/artifacts good/artifacts curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-release-aarch64-next-def... --fail curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-release-aarch64-next-def... --fail
# Reproduce bad build (cd bad; ../jenkins-scripts/tcwg_kernel-build.sh ^^ true %%rr[top_artifacts] artifacts) # Reproduce good build (cd good; ../jenkins-scripts/tcwg_kernel-build.sh ^^ true %%rr[top_artifacts] artifacts) </cut>
Full commit (up to 1000 lines): <cut> commit aa3e1ec495ab2fc3f22fc9240ad53a23b21fe0a1 Author: Naoya Horiguchi naoya.horiguchi@nec.com Date: Wed Sep 21 18:13:57 2022 +0900
mm/hwpoison: move definitions of num_poisoned_pages_* to memory-failure.c
These interfaces will be used by drivers/base/core.c by later patch, so as a preparatory work move them to more common header file visible to the file.
Link: https://lkml.kernel.org/r/20220921091359.25889-3-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi naoya.horiguchi@nec.com Cc: David Hildenbrand david@redhat.com Cc: Jane Chu jane.chu@oracle.com Cc: Miaohe Lin linmiaohe@huawei.com Cc: Mike Kravetz mike.kravetz@oracle.com Cc: Muchun Song songmuchun@bytedance.com Cc: Oscar Salvador osalvador@suse.de Cc: Yang Shi shy828301@gmail.com Signed-off-by: Andrew Morton akpm@linux-foundation.org --- arch/parisc/kernel/pdt.c | 3 +-- include/linux/mm.h | 5 +++++ include/linux/swapops.h | 24 ++---------------------- mm/memory-failure.c | 10 ++++++++++ 4 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c index e391b175f5ec..fdc880e2575a 100644 --- a/arch/parisc/kernel/pdt.c +++ b/arch/parisc/kernel/pdt.c @@ -18,8 +18,7 @@ #include <linux/kthread.h> #include <linux/initrd.h> #include <linux/pgtable.h> -#include <linux/swap.h> -#include <linux/swapops.h> +#include <linux/mm.h>
#include <asm/pdc.h> #include <asm/pdcpat.h> diff --git a/include/linux/mm.h b/include/linux/mm.h index c2277f5aba9e..80a2d800f272 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3279,11 +3279,16 @@ extern atomic_long_t num_poisoned_pages __read_mostly; extern int soft_offline_page(unsigned long pfn, int flags); #ifdef CONFIG_MEMORY_FAILURE extern int __get_huge_page_for_hwpoison(unsigned long pfn, int flags); +extern void num_poisoned_pages_inc(void); #else static inline int __get_huge_page_for_hwpoison(unsigned long pfn, int flags) { return 0; } + +static inline void num_poisoned_pages_inc(void) +{ +} #endif
#ifndef arch_memory_failure diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 86b95ccb81bb..3ba9bf56899d 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h @@ -581,8 +581,6 @@ static inline int is_pmd_migration_entry(pmd_t pmd)
#ifdef CONFIG_MEMORY_FAILURE
-extern atomic_long_t num_poisoned_pages __read_mostly; - /* * Support for hardware poisoned pages */ @@ -597,17 +595,7 @@ static inline int is_hwpoison_entry(swp_entry_t entry) return swp_type(entry) == SWP_HWPOISON; }
-static inline void num_poisoned_pages_inc(void) -{ - atomic_long_inc(&num_poisoned_pages); -} - -static inline void num_poisoned_pages_sub(long i) -{ - atomic_long_sub(i, &num_poisoned_pages); -} - -#else /* CONFIG_MEMORY_FAILURE */ +#else
static inline swp_entry_t make_hwpoison_entry(struct page *page) { @@ -618,15 +606,7 @@ static inline int is_hwpoison_entry(swp_entry_t swp) { return 0; } - -static inline void num_poisoned_pages_inc(void) -{ -} - -static inline void num_poisoned_pages_sub(long i) -{ -} -#endif /* CONFIG_MEMORY_FAILURE */ +#endif
static inline int non_swap_entry(swp_entry_t entry) { diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 5942e1c0407e..aa6ce685b863 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -74,6 +74,16 @@ atomic_long_t num_poisoned_pages __read_mostly = ATOMIC_LONG_INIT(0);
static bool hw_memory_failure __read_mostly = false;
+static inline void num_poisoned_pages_inc(void) +{ + atomic_long_inc(&num_poisoned_pages); +} + +static inline void num_poisoned_pages_sub(long i) +{ + atomic_long_sub(i, &num_poisoned_pages); +} + /* * Return values: * 1: the page is dissolved (if needed) and taken off from buddy, </cut>
linaro-kernel@lists.linaro.org