[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202103090555.LtLPf1Ho-lkp@intel.com>
Date: Tue, 9 Mar 2021 05:29:30 +0800
From: kernel test robot <lkp@...el.com>
To: Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: kbuild-all@...org,
Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
John Dias <joaodias@...gle.com>,
Michal Hocko <mhocko@...e.com>,
David Hildenbrand <david@...hat.com>,
Jason Baron <jbaron@...mai.com>,
Minchan Kim <minchan@...nel.org>
Subject: Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages
Hi Minchan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on hnaz-linux-mm/master]
url: https://github.com/0day-ci/linux/commits/Minchan-Kim/mm-page_alloc-dump-migrate-failed-pages/20210309-042205
base: https://github.com/hnaz/linux-mm master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/3c635af37b862e9c601ee8d5818f7da9cd3e2e57
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Minchan-Kim/mm-page_alloc-dump-migrate-failed-pages/20210309-042205
git checkout 3c635af37b862e9c601ee8d5818f7da9cd3e2e57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/page.h:60,
from arch/m68k/include/asm/thread_info.h:6,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from mm/page_alloc.c:19:
mm/internal.h: In function 'mem_map_next':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
mm/internal.h:456:8: note: in expansion of macro 'pfn_valid'
456 | if (!pfn_valid(pfn))
| ^~~~~~~~~
mm/page_alloc.c: In function 'reserve_bootmem_region':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
mm/page_alloc.c:1444:7: note: in expansion of macro 'pfn_valid'
1444 | if (pfn_valid(start_pfn)) {
| ^~~~~~~~~
mm/page_alloc.c: In function '__pageblock_pfn_to_page':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
mm/page_alloc.c:1576:7: note: in expansion of macro 'pfn_valid'
1576 | if (!pfn_valid(start_pfn) || !pfn_valid(end_pfn))
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
mm/page_alloc.c:1576:32: note: in expansion of macro 'pfn_valid'
1576 | if (!pfn_valid(start_pfn) || !pfn_valid(end_pfn))
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/memory_hotplug.h:242:6: note: in expansion of macro 'pfn_valid'
242 | if (pfn_valid(pfn)) \
| ^~~~~~~~~
mm/page_alloc.c:1579:15: note: in expansion of macro 'pfn_to_online_page'
1579 | start_page = pfn_to_online_page(start_pfn);
| ^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:5,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from mm/page_alloc.c:19:
mm/page_alloc.c: In function 'free_pages':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/mmdebug.h:18:25: note: in expansion of macro 'BUG_ON'
18 | #define VM_BUG_ON(cond) BUG_ON(cond)
| ^~~~~~
mm/page_alloc.c:4953:3: note: in expansion of macro 'VM_BUG_ON'
4953 | VM_BUG_ON(!virt_addr_valid((void *)addr));
| ^~~~~~~~~
mm/page_alloc.c:4953:14: note: in expansion of macro 'virt_addr_valid'
4953 | VM_BUG_ON(!virt_addr_valid((void *)addr));
| ^~~~~~~~~~~~~~~
mm/page_alloc.c: At top level:
mm/page_alloc.c:6122:23: warning: no previous prototype for 'memmap_init' [-Wmissing-prototypes]
6122 | void __meminit __weak memmap_init(unsigned long size, int nid,
| ^~~~~~~~~~~
>> mm/page_alloc.c:8348:5: warning: no previous prototype for 'alloc_contig_ratelimit' [-Wmissing-prototypes]
8348 | int alloc_contig_ratelimit(void)
| ^~~~~~~~~~~~~~~~~~~~~~
>> mm/page_alloc.c:8353:6: warning: no previous prototype for 'dump_migrate_failure_pages' [-Wmissing-prototypes]
8353 | void dump_migrate_failure_pages(struct list_head *page_list)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/page.h:60,
from arch/m68k/include/asm/thread_info.h:6,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from mm/page_alloc.c:19:
mm/page_alloc.c: In function 'pfn_range_valid_contig':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/memory_hotplug.h:242:6: note: in expansion of macro 'pfn_valid'
242 | if (pfn_valid(pfn)) \
| ^~~~~~~~~
mm/page_alloc.c:8592:10: note: in expansion of macro 'pfn_to_online_page'
8592 | page = pfn_to_online_page(i);
| ^~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +/alloc_contig_ratelimit +8348 mm/page_alloc.c
8343
8344 #if defined(CONFIG_DYNAMIC_DEBUG) || \
8345 (defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE))
8346 static DEFINE_RATELIMIT_STATE(alloc_contig_ratelimit_state,
8347 DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);
> 8348 int alloc_contig_ratelimit(void)
8349 {
8350 return __ratelimit(&alloc_contig_ratelimit_state);
8351 }
8352
> 8353 void dump_migrate_failure_pages(struct list_head *page_list)
8354 {
8355 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor,
8356 "migrate failure");
8357 if (DYNAMIC_DEBUG_BRANCH(descriptor) &&
8358 alloc_contig_ratelimit()) {
8359 struct page *page;
8360
8361 WARN(1, "failed callstack");
8362 list_for_each_entry(page, page_list, lru)
8363 dump_page(page, "migration failure");
8364 }
8365 }
8366 #else
8367 static inline void dump_migrate_failure_pages(struct list_head *page_list)
8368 {
8369 }
8370 #endif
8371
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (57871 bytes)
Powered by blists - more mailing lists