tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c35bd4e428856ed8c1fae7f7dfa08a9141c153d1 commit: 3f85e711d5af4fb4fb2df6592d41d41523dfd2eb [10012/10444] mm: introduce arch_has_hw_nonleaf_pmd_young() config: arc-randconfig-r043-20221124 compiler: arc-elf-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f85e711d5af4fb4fb2df6592d41d41523dfd2eb git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 3f85e711d5af4fb4fb2df6592d41d41523dfd2eb # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): mm/vmscan.c: In function 'walk_pmd_range': >> mm/vmscan.c:4090:30: error: implicit declaration of function 'pmd_young'; did you mean 'pte_young'? [-Werror=implicit-function-declaration] 4090 | if (!pmd_young(val)) | ^~~~~~~~~ | pte_young cc1: some warnings being treated as errors vim +4090 mm/vmscan.c bd74fdaea14602 Yu Zhao 2022-09-18 4029 bd74fdaea14602 Yu Zhao 2022-09-18 4030 static void walk_pmd_range(pud_t *pud, unsigned long start, unsigned long end, bd74fdaea14602 Yu Zhao 2022-09-18 4031 struct mm_walk *args) bd74fdaea14602 Yu Zhao 2022-09-18 4032 { bd74fdaea14602 Yu Zhao 2022-09-18 4033 int i; bd74fdaea14602 Yu Zhao 2022-09-18 4034 pmd_t *pmd; bd74fdaea14602 Yu Zhao 2022-09-18 4035 unsigned long next; bd74fdaea14602 Yu Zhao 2022-09-18 4036 unsigned long addr; bd74fdaea14602 Yu Zhao 2022-09-18 4037 struct vm_area_struct *vma; bd74fdaea14602 Yu Zhao 2022-09-18 4038 unsigned long pos = -1; bd74fdaea14602 Yu Zhao 2022-09-18 4039 struct lru_gen_mm_walk *walk = args->private; bd74fdaea14602 Yu Zhao 2022-09-18 4040 unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)] = {}; bd74fdaea14602 Yu Zhao 2022-09-18 4041 bd74fdaea14602 Yu Zhao 2022-09-18 4042 VM_WARN_ON_ONCE(pud_leaf(*pud)); bd74fdaea14602 Yu Zhao 2022-09-18 4043 bd74fdaea14602 Yu Zhao 2022-09-18 4044 /* bd74fdaea14602 Yu Zhao 2022-09-18 4045 * Finish an entire PMD in two passes: the first only reaches to PTE bd74fdaea14602 Yu Zhao 2022-09-18 4046 * tables to avoid taking the PMD lock; the second, if necessary, takes bd74fdaea14602 Yu Zhao 2022-09-18 4047 * the PMD lock to clear the accessed bit in PMD entries. bd74fdaea14602 Yu Zhao 2022-09-18 4048 */ bd74fdaea14602 Yu Zhao 2022-09-18 4049 pmd = pmd_offset(pud, start & PUD_MASK); bd74fdaea14602 Yu Zhao 2022-09-18 4050 restart: bd74fdaea14602 Yu Zhao 2022-09-18 4051 /* walk_pte_range() may call get_next_vma() */ bd74fdaea14602 Yu Zhao 2022-09-18 4052 vma = args->vma; bd74fdaea14602 Yu Zhao 2022-09-18 4053 for (i = pmd_index(start), addr = start; addr != end; i++, addr = next) { bd74fdaea14602 Yu Zhao 2022-09-18 4054 pmd_t val = pmd_read_atomic(pmd + i); bd74fdaea14602 Yu Zhao 2022-09-18 4055 bd74fdaea14602 Yu Zhao 2022-09-18 4056 /* for pmd_read_atomic() */ bd74fdaea14602 Yu Zhao 2022-09-18 4057 barrier(); bd74fdaea14602 Yu Zhao 2022-09-18 4058 bd74fdaea14602 Yu Zhao 2022-09-18 4059 next = pmd_addr_end(addr, end); bd74fdaea14602 Yu Zhao 2022-09-18 4060 bd74fdaea14602 Yu Zhao 2022-09-18 4061 if (!pmd_present(val) || is_huge_zero_pmd(val)) { bd74fdaea14602 Yu Zhao 2022-09-18 4062 walk->mm_stats[MM_LEAF_TOTAL]++; bd74fdaea14602 Yu Zhao 2022-09-18 4063 continue; bd74fdaea14602 Yu Zhao 2022-09-18 4064 } bd74fdaea14602 Yu Zhao 2022-09-18 4065 bd74fdaea14602 Yu Zhao 2022-09-18 4066 #ifdef CONFIG_TRANSPARENT_HUGEPAGE bd74fdaea14602 Yu Zhao 2022-09-18 4067 if (pmd_trans_huge(val)) { bd74fdaea14602 Yu Zhao 2022-09-18 4068 unsigned long pfn = pmd_pfn(val); bd74fdaea14602 Yu Zhao 2022-09-18 4069 struct pglist_data *pgdat = lruvec_pgdat(walk->lruvec); bd74fdaea14602 Yu Zhao 2022-09-18 4070 bd74fdaea14602 Yu Zhao 2022-09-18 4071 walk->mm_stats[MM_LEAF_TOTAL]++; bd74fdaea14602 Yu Zhao 2022-09-18 4072 bd74fdaea14602 Yu Zhao 2022-09-18 4073 if (!pmd_young(val)) { bd74fdaea14602 Yu Zhao 2022-09-18 4074 walk->mm_stats[MM_LEAF_OLD]++; bd74fdaea14602 Yu Zhao 2022-09-18 4075 continue; bd74fdaea14602 Yu Zhao 2022-09-18 4076 } bd74fdaea14602 Yu Zhao 2022-09-18 4077 bd74fdaea14602 Yu Zhao 2022-09-18 4078 /* try to avoid unnecessary memory loads */ bd74fdaea14602 Yu Zhao 2022-09-18 4079 if (pfn < pgdat->node_start_pfn || pfn >= pgdat_end_pfn(pgdat)) bd74fdaea14602 Yu Zhao 2022-09-18 4080 continue; bd74fdaea14602 Yu Zhao 2022-09-18 4081 bd74fdaea14602 Yu Zhao 2022-09-18 4082 walk_pmd_range_locked(pud, addr, vma, args, bitmap, &pos); bd74fdaea14602 Yu Zhao 2022-09-18 4083 continue; bd74fdaea14602 Yu Zhao 2022-09-18 4084 } bd74fdaea14602 Yu Zhao 2022-09-18 4085 #endif bd74fdaea14602 Yu Zhao 2022-09-18 4086 walk->mm_stats[MM_NONLEAF_TOTAL]++; bd74fdaea14602 Yu Zhao 2022-09-18 4087 3f85e711d5af4f Juergen Gross 2022-11-23 4088 if (arch_has_hw_nonleaf_pmd_young() && 3f85e711d5af4f Juergen Gross 2022-11-23 4089 get_cap(LRU_GEN_NONLEAF_YOUNG)) { bd74fdaea14602 Yu Zhao 2022-09-18 @4090 if (!pmd_young(val)) bd74fdaea14602 Yu Zhao 2022-09-18 4091 continue; bd74fdaea14602 Yu Zhao 2022-09-18 4092 bd74fdaea14602 Yu Zhao 2022-09-18 4093 walk_pmd_range_locked(pud, addr, vma, args, bitmap, &pos); 354ed597442952 Yu Zhao 2022-09-18 4094 } 3f85e711d5af4f Juergen Gross 2022-11-23 4095 bd74fdaea14602 Yu Zhao 2022-09-18 4096 if (!walk->force_scan && !test_bloom_filter(walk->lruvec, walk->max_seq, pmd + i)) bd74fdaea14602 Yu Zhao 2022-09-18 4097 continue; bd74fdaea14602 Yu Zhao 2022-09-18 4098 bd74fdaea14602 Yu Zhao 2022-09-18 4099 walk->mm_stats[MM_NONLEAF_FOUND]++; bd74fdaea14602 Yu Zhao 2022-09-18 4100 bd74fdaea14602 Yu Zhao 2022-09-18 4101 if (!walk_pte_range(&val, addr, next, args)) bd74fdaea14602 Yu Zhao 2022-09-18 4102 continue; bd74fdaea14602 Yu Zhao 2022-09-18 4103 bd74fdaea14602 Yu Zhao 2022-09-18 4104 walk->mm_stats[MM_NONLEAF_ADDED]++; bd74fdaea14602 Yu Zhao 2022-09-18 4105 bd74fdaea14602 Yu Zhao 2022-09-18 4106 /* carry over to the next generation */ bd74fdaea14602 Yu Zhao 2022-09-18 4107 update_bloom_filter(walk->lruvec, walk->max_seq + 1, pmd + i); bd74fdaea14602 Yu Zhao 2022-09-18 4108 } bd74fdaea14602 Yu Zhao 2022-09-18 4109 bd74fdaea14602 Yu Zhao 2022-09-18 4110 walk_pmd_range_locked(pud, -1, vma, args, bitmap, &pos); bd74fdaea14602 Yu Zhao 2022-09-18 4111 bd74fdaea14602 Yu Zhao 2022-09-18 4112 if (i < PTRS_PER_PMD && get_next_vma(PUD_MASK, PMD_SIZE, args, &start, &end)) bd74fdaea14602 Yu Zhao 2022-09-18 4113 goto restart; bd74fdaea14602 Yu Zhao 2022-09-18 4114 } bd74fdaea14602 Yu Zhao 2022-09-18 4115 :::::: The code at line 4090 was first introduced by commit :::::: bd74fdaea146029e4fa12c6de89adbe0779348a9 mm: multi-gen LRU: support page table walks :::::: TO: Yu Zhao :::::: CC: Andrew Morton -- 0-DAY CI Kernel Test Service https://01.org/lkp