tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: f69d02e37a85645aa90d18cacfff36dba370f797 commit: 1d91df85f399adbe4f318f3e74ac5a5d84c0ca7c mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs date: 5 months ago config: powerpc-randconfig-r023-20210304 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project eec7f8f7b1226be422a76542cb403d02538f453a) 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 # install powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d91df85f399adbe4f318f3e74ac5a5d84c0ca7c git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 1d91df85f399adbe4f318f3e74ac5a5d84c0ca7c # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from include/linux/hardirq.h:10: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:239:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/page_alloc.c:20: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:10: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:244:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/page_alloc.c:20: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:10: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:249:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/page_alloc.c:20: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:10: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:4:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/page_alloc.c:20: In file included from include/linux/highmem.h:10: In file included from include/linux/hardirq.h:10: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:9:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ mm/page_alloc.c:6138:23: warning: no previous prototype for function 'memmap_init' [-Wmissing-prototypes] void __meminit __weak memmap_init(unsigned long size, int nid, ^ mm/page_alloc.c:6138:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __meminit __weak memmap_init(unsigned long size, int nid, ^ static >> mm/page_alloc.c:3728:1: warning: stack frame size of 2064 bytes in function 'get_page_from_freelist' [-Wframe-larger-than=] get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, ^ 14 warnings generated. vim +/get_page_from_freelist +3728 mm/page_alloc.c 8510e69c8efef82 Joonsoo Kim 2020-08-06 3722 7fb1d9fca5c6e3b Rohit Seth 2005-11-13 3723 /* 0798e5193cd70f6 Paul Jackson 2006-12-06 3724 * get_page_from_freelist goes through the zonelist trying to allocate 7fb1d9fca5c6e3b Rohit Seth 2005-11-13 3725 * a page. 7fb1d9fca5c6e3b Rohit Seth 2005-11-13 3726 */ 7fb1d9fca5c6e3b Rohit Seth 2005-11-13 3727 static struct page * a9263751e11a07a Vlastimil Babka 2015-02-11 @3728 get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, a9263751e11a07a Vlastimil Babka 2015-02-11 3729 const struct alloc_context *ac) 753ee728964e5af Martin Hicks 2005-06-21 3730 { 6bb154504f8b496 Mel Gorman 2018-12-28 3731 struct zoneref *z; 5117f45d11a9ee6 Mel Gorman 2009-06-16 3732 struct zone *zone; 3b8c0be43cb844b Mel Gorman 2016-07-28 3733 struct pglist_data *last_pgdat_dirty_limit = NULL; 6bb154504f8b496 Mel Gorman 2018-12-28 3734 bool no_fallback; 3b8c0be43cb844b Mel Gorman 2016-07-28 3735 6bb154504f8b496 Mel Gorman 2018-12-28 3736 retry: 7fb1d9fca5c6e3b Rohit Seth 2005-11-13 3737 /* 9276b1bc96a132f Paul Jackson 2006-12-06 3738 * Scan zonelist, looking for a zone with enough free. 344736f29b35979 Vladimir Davydov 2014-10-20 3739 * See also __cpuset_node_allowed() comment in kernel/cpuset.c. 7fb1d9fca5c6e3b Rohit Seth 2005-11-13 3740 */ 6bb154504f8b496 Mel Gorman 2018-12-28 3741 no_fallback = alloc_flags & ALLOC_NOFRAGMENT; 6bb154504f8b496 Mel Gorman 2018-12-28 3742 z = ac->preferred_zoneref; 97a225e69a1f880 Joonsoo Kim 2020-06-03 3743 for_next_zone_zonelist_nodemask(zone, z, ac->zonelist, 97a225e69a1f880 Joonsoo Kim 2020-06-03 3744 ac->highest_zoneidx, ac->nodemask) { be06af002f6d50d Mel Gorman 2016-05-19 3745 struct page *page; e085dbc52fad8d7 Johannes Weiner 2013-09-11 3746 unsigned long mark; e085dbc52fad8d7 Johannes Weiner 2013-09-11 3747 664eeddeef65392 Mel Gorman 2014-06-04 3748 if (cpusets_enabled() && 664eeddeef65392 Mel Gorman 2014-06-04 3749 (alloc_flags & ALLOC_CPUSET) && 002f290627c2706 Vlastimil Babka 2016-05-19 3750 !__cpuset_zone_allowed(zone, gfp_mask)) cd38b115d5ad79b Mel Gorman 2011-07-25 3751 continue; a756cf5908530e8 Johannes Weiner 2012-01-10 3752 /* a756cf5908530e8 Johannes Weiner 2012-01-10 3753 * When allocating a page cache page for writing, we 281e37265f2826e Mel Gorman 2016-07-28 3754 * want to get it from a node that is within its dirty 281e37265f2826e Mel Gorman 2016-07-28 3755 * limit, such that no single node holds more than its a756cf5908530e8 Johannes Weiner 2012-01-10 3756 * proportional share of globally allowed dirty pages. 281e37265f2826e Mel Gorman 2016-07-28 3757 * The dirty limits take into account the node's a756cf5908530e8 Johannes Weiner 2012-01-10 3758 * lowmem reserves and high watermark so that kswapd a756cf5908530e8 Johannes Weiner 2012-01-10 3759 * should be able to balance it without having to a756cf5908530e8 Johannes Weiner 2012-01-10 3760 * write pages from its LRU list. a756cf5908530e8 Johannes Weiner 2012-01-10 3761 * a756cf5908530e8 Johannes Weiner 2012-01-10 3762 * XXX: For now, allow allocations to potentially 281e37265f2826e Mel Gorman 2016-07-28 3763 * exceed the per-node dirty limit in the slowpath c9ab0c4fbeb0202 Mel Gorman 2015-11-06 3764 * (spread_dirty_pages unset) before going into reclaim, a756cf5908530e8 Johannes Weiner 2012-01-10 3765 * which is important when on a NUMA setup the allowed 281e37265f2826e Mel Gorman 2016-07-28 3766 * nodes are together not big enough to reach the a756cf5908530e8 Johannes Weiner 2012-01-10 3767 * global limit. The proper fix for these situations 281e37265f2826e Mel Gorman 2016-07-28 3768 * will require awareness of nodes in the a756cf5908530e8 Johannes Weiner 2012-01-10 3769 * dirty-throttling and the flusher threads. a756cf5908530e8 Johannes Weiner 2012-01-10 3770 */ 3b8c0be43cb844b Mel Gorman 2016-07-28 3771 if (ac->spread_dirty_pages) { 3b8c0be43cb844b Mel Gorman 2016-07-28 3772 if (last_pgdat_dirty_limit == zone->zone_pgdat) 3b8c0be43cb844b Mel Gorman 2016-07-28 3773 continue; 3b8c0be43cb844b Mel Gorman 2016-07-28 3774 3b8c0be43cb844b Mel Gorman 2016-07-28 3775 if (!node_dirty_ok(zone->zone_pgdat)) { 3b8c0be43cb844b Mel Gorman 2016-07-28 3776 last_pgdat_dirty_limit = zone->zone_pgdat; 800a1e750c7b04c Mel Gorman 2014-06-04 3777 continue; 3b8c0be43cb844b Mel Gorman 2016-07-28 3778 } 3b8c0be43cb844b Mel Gorman 2016-07-28 3779 } 7fb1d9fca5c6e3b Rohit Seth 2005-11-13 3780 6bb154504f8b496 Mel Gorman 2018-12-28 3781 if (no_fallback && nr_online_nodes > 1 && 6bb154504f8b496 Mel Gorman 2018-12-28 3782 zone != ac->preferred_zoneref->zone) { 6bb154504f8b496 Mel Gorman 2018-12-28 3783 int local_nid; 6bb154504f8b496 Mel Gorman 2018-12-28 3784 6bb154504f8b496 Mel Gorman 2018-12-28 3785 /* 6bb154504f8b496 Mel Gorman 2018-12-28 3786 * If moving to a remote node, retry but allow 6bb154504f8b496 Mel Gorman 2018-12-28 3787 * fragmenting fallbacks. Locality is more important 6bb154504f8b496 Mel Gorman 2018-12-28 3788 * than fragmentation avoidance. 6bb154504f8b496 Mel Gorman 2018-12-28 3789 */ 6bb154504f8b496 Mel Gorman 2018-12-28 3790 local_nid = zone_to_nid(ac->preferred_zoneref->zone); 6bb154504f8b496 Mel Gorman 2018-12-28 3791 if (zone_to_nid(zone) != local_nid) { 6bb154504f8b496 Mel Gorman 2018-12-28 3792 alloc_flags &= ~ALLOC_NOFRAGMENT; 6bb154504f8b496 Mel Gorman 2018-12-28 3793 goto retry; 6bb154504f8b496 Mel Gorman 2018-12-28 3794 } 6bb154504f8b496 Mel Gorman 2018-12-28 3795 } 6bb154504f8b496 Mel Gorman 2018-12-28 3796 a921444382b49cc Mel Gorman 2018-12-28 3797 mark = wmark_pages(zone, alloc_flags & ALLOC_WMARK_MASK); 48ee5f3696f6249 Mel Gorman 2016-05-19 3798 if (!zone_watermark_fast(zone, order, mark, f80b08fc44536a3 Charan Teja Reddy 2020-08-06 3799 ac->highest_zoneidx, alloc_flags, f80b08fc44536a3 Charan Teja Reddy 2020-08-06 3800 gfp_mask)) { e085dbc52fad8d7 Johannes Weiner 2013-09-11 3801 int ret; fa5e084e43eb14c Mel Gorman 2009-06-16 3802 :::::: The code at line 3728 was first introduced by commit :::::: a9263751e11a07af40a98dba88021821cd430cfd mm, page_alloc: reduce number of alloc_pages* functions' parameters :::::: TO: Vlastimil Babka <vbabka@xxxxxxx> :::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip