Hi Ning, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on linus/master] [also build test ERROR on v5.15-rc7] [cannot apply to hnaz-mm/master next-20211028] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Ning-Zhang/Reclaim-zero-subpages-of-thp-to-avoid-memory-bloat/20211028-200001 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1fc596a56b334f4d593a2b49e5ff55af6aaa0816 config: arm-randconfig-c002-20211028 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72) 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 arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/0day-ci/linux/commit/ba9f8c1a43c2d9ab2d2ac5696aaffbeaf043fa02 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Ning-Zhang/Reclaim-zero-subpages-of-thp-to-avoid-memory-bloat/20211028-200001 git checkout ba9f8c1a43c2d9ab2d2ac5696aaffbeaf043fa02 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): mm/vmscan.c:1340:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] int err; ^ >> mm/vmscan.c:2803:36: error: no member named 'hpage_reclaim_queue' in 'struct mem_cgroup_per_node' hr_queue = &memcg->nodeinfo[nid]->hpage_reclaim_queue; ~~~~~~~~~~~~~~~~~~~~ ^ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:290:10: note: expanded from macro '__native_word' (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ ^ include/linux/compiler_types.h:322:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~ include/linux/compiler_types.h:310:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:302:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:290:39: note: expanded from macro '__native_word' (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \ ^ include/linux/compiler_types.h:322:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~ include/linux/compiler_types.h:310:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:302:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:291:10: note: expanded from macro '__native_word' sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) ^ include/linux/compiler_types.h:322:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~ include/linux/compiler_types.h:310:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:302:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:291:38: note: expanded from macro '__native_word' sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) ^ include/linux/compiler_types.h:322:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~ include/linux/compiler_types.h:310:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:302:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:322:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~ include/linux/compiler_types.h:310:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:302:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' __READ_ONCE(x); \ ^ include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE' #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) ^ include/linux/compiler_types.h:279:13: note: expanded from macro '__unqual_scalar_typeof' _Generic((x), \ ^ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' __READ_ONCE(x); \ ^ include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE' #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) ^ include/linux/compiler_types.h:286:15: note: expanded from macro '__unqual_scalar_typeof' default: (x))) ^ mm/vmscan.c:2804:24: error: no member named 'thp_reclaim' in 'struct mem_cgroup' if (!READ_ONCE(memcg->thp_reclaim)) ~~~~~ ^ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' __READ_ONCE(x); \ ^ include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE' #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) ^ mm/vmscan.c:2804:6: error: invalid argument type 'void' to unary expression if (!READ_ONCE(memcg->thp_reclaim)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> mm/vmscan.c:2813:7: error: implicit declaration of function 'zsr_get_hpage' [-Werror,-Wimplicit-function-declaration] if (zsr_get_hpage(hr_queue, &page)) ^ >> mm/vmscan.c:2819:19: error: implicit declaration of function 'zsr_reclaim_hpage' [-Werror,-Wimplicit-function-declaration] nr_reclaimed += zsr_reclaim_hpage(lruvec, page); ^ 1 warning and 12 errors generated. vim +2803 mm/vmscan.c 2784 2785 #ifdef CONFIG_MEMCG 2786 #define MAX_SCAN_HPAGE 32UL 2787 /* 2788 * Try to reclaim the zero subpages for the transparent huge page. 2789 */ 2790 static unsigned long reclaim_hpage_zero_subpages(struct lruvec *lruvec, 2791 int priority, 2792 unsigned long nr_to_reclaim) 2793 { 2794 struct mem_cgroup *memcg; 2795 struct hpage_reclaim *hr_queue; 2796 int nid = lruvec->pgdat->node_id; 2797 unsigned long nr_reclaimed = 0, nr_scanned = 0, nr_to_scan; 2798 2799 memcg = lruvec_memcg(lruvec); 2800 if (!memcg) 2801 goto out; 2802 > 2803 hr_queue = &memcg->nodeinfo[nid]->hpage_reclaim_queue; 2804 if (!READ_ONCE(memcg->thp_reclaim)) 2805 goto out; 2806 2807 /* The last scan loop will scan all the huge pages.*/ 2808 nr_to_scan = priority == 0 ? 0 : MAX_SCAN_HPAGE; 2809 2810 do { 2811 struct page *page = NULL; 2812 > 2813 if (zsr_get_hpage(hr_queue, &page)) 2814 break; 2815 2816 if (!page) 2817 continue; 2818 > 2819 nr_reclaimed += zsr_reclaim_hpage(lruvec, page); 2820 2821 cond_resched(); 2822 2823 } while ((nr_reclaimed < nr_to_reclaim) && (++nr_scanned != nr_to_scan)); 2824 out: 2825 return nr_reclaimed; 2826 } 2827 #else 2828 static unsigned long reclaim_hpage_zero_subpages(struct lruvec *lruvec, 2829 int priority, 2830 unsigned long nr_to_reclaim) 2831 { 2832 return 0; 2833 } 2834 #endif 2835 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org