Hi Qi, Thank you for the patch! Yet something to improve: [auto build test ERROR on hnaz-mm/master] [also build test ERROR on linus/master next-20211110] [cannot apply to tip/perf/core tip/x86/core v5.15] [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/Qi-Zheng/Free-user-PTE-page-table-pages/20211110-185837 base: https://github.com/hnaz/linux-mm master config: mips-allyesconfig (attached as .config) compiler: mips-linux-gcc (GCC) 11.2.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/e03404013f81d7b11aa6f5c3fef3816320b2baf0 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Qi-Zheng/Free-user-PTE-page-table-pages/20211110-185837 git checkout e03404013f81d7b11aa6f5c3fef3816320b2baf0 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips prepare If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): error: no override and no default toolchain set init/Kconfig:70:warning: 'RUSTC_VERSION': number is invalid In file included from include/linux/mmzone.h:21, from include/linux/gfp.h:6, from include/linux/radix-tree.h:12, from include/linux/fs.h:15, from include/linux/compat.h:17, from arch/mips/kernel/asm-offsets.c:12: >> include/linux/mm_types.h:154:33: error: unknown type name 'pmd_t' 154 | pmd_t *pmd; /* PTE page only */ | ^~~~~ In file included from include/asm-generic/div64.h:27, from arch/mips/include/asm/div64.h:89, from include/linux/math.h:5, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/compat.h:10, from arch/mips/kernel/asm-offsets.c:12: include/linux/mm.h: In function 'pte_alloc': include/linux/mm.h:2318:22: error: implicit declaration of function 'is_huge_pmd'; did you mean 'zap_huge_pmd'? [-Werror=implicit-function-declaration] 2318 | if (unlikely(is_huge_pmd(*pmd))) | ^~~~~~~~~~~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ arch/mips/kernel/asm-offsets.c: At top level: arch/mips/kernel/asm-offsets.c:26:6: error: no previous prototype for 'output_ptreg_defines' [-Werror=missing-prototypes] 26 | void output_ptreg_defines(void) | ^~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:78:6: error: no previous prototype for 'output_task_defines' [-Werror=missing-prototypes] 78 | void output_task_defines(void) | ^~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:92:6: error: no previous prototype for 'output_thread_info_defines' [-Werror=missing-prototypes] 92 | void output_thread_info_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:108:6: error: no previous prototype for 'output_thread_defines' [-Werror=missing-prototypes] 108 | void output_thread_defines(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:136:6: error: no previous prototype for 'output_thread_fpu_defines' [-Werror=missing-prototypes] 136 | void output_thread_fpu_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:179:6: error: no previous prototype for 'output_mm_defines' [-Werror=missing-prototypes] 179 | void output_mm_defines(void) | ^~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:218:6: error: no previous prototype for 'output_sc_defines' [-Werror=missing-prototypes] 218 | void output_sc_defines(void) | ^~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:253:6: error: no previous prototype for 'output_signal_defined' [-Werror=missing-prototypes] 253 | void output_signal_defined(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:320:6: error: no previous prototype for 'output_pbe_defines' [-Werror=missing-prototypes] 320 | void output_pbe_defines(void) | ^~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:332:6: error: no previous prototype for 'output_pm_defines' [-Werror=missing-prototypes] 332 | void output_pm_defines(void) | ^~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:346:6: error: no previous prototype for 'output_kvm_defines' [-Werror=missing-prototypes] 346 | void output_kvm_defines(void) | ^~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:390:6: error: no previous prototype for 'output_cps_defines' [-Werror=missing-prototypes] 390 | void output_cps_defines(void) | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [scripts/Makefile.build:122: arch/mips/kernel/asm-offsets.s] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [Makefile:1288: prepare0] Error 2 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:226: __sub-make] Error 2 make: Target 'prepare' not remade because of errors. vim +/pmd_t +154 include/linux/mm_types.h 70 71 struct page { 72 unsigned long flags; /* Atomic flags, some possibly 73 * updated asynchronously */ 74 /* 75 * Five words (20/40 bytes) are available in this union. 76 * WARNING: bit 0 of the first word is used for PageTail(). That 77 * means the other users of this union MUST NOT use the bit to 78 * avoid collision and false-positive PageTail(). 79 */ 80 union { 81 struct { /* Page cache and anonymous pages */ 82 /** 83 * @lru: Pageout list, eg. active_list protected by 84 * lruvec->lru_lock. Sometimes used as a generic list 85 * by the page owner. 86 */ 87 struct list_head lru; 88 /* See page-flags.h for PAGE_MAPPING_FLAGS */ 89 struct address_space *mapping; 90 pgoff_t index; /* Our offset within mapping. */ 91 /** 92 * @private: Mapping-private opaque data. 93 * Usually used for buffer_heads if PagePrivate. 94 * Used for swp_entry_t if PageSwapCache. 95 * Indicates order in the buddy system if PageBuddy. 96 */ 97 unsigned long private; 98 }; 99 struct { /* page_pool used by netstack */ 100 /** 101 * @pp_magic: magic value to avoid recycling non 102 * page_pool allocated pages. 103 */ 104 unsigned long pp_magic; 105 struct page_pool *pp; 106 unsigned long _pp_mapping_pad; 107 unsigned long dma_addr; 108 atomic_long_t pp_frag_count; 109 }; 110 struct { /* slab, slob and slub */ 111 union { 112 struct list_head slab_list; 113 struct { /* Partial pages */ 114 struct page *next; 115 #ifdef CONFIG_64BIT 116 int pages; /* Nr of pages left */ 117 #else 118 short int pages; 119 #endif 120 }; 121 }; 122 struct kmem_cache *slab_cache; /* not slob */ 123 /* Double-word boundary */ 124 void *freelist; /* first free object */ 125 union { 126 void *s_mem; /* slab: first object */ 127 unsigned long counters; /* SLUB */ 128 struct { /* SLUB */ 129 unsigned inuse:16; 130 unsigned objects:15; 131 unsigned frozen:1; 132 }; 133 }; 134 }; 135 struct { /* Tail pages of compound page */ 136 unsigned long compound_head; /* Bit zero is set */ 137 138 /* First tail page only */ 139 unsigned char compound_dtor; 140 unsigned char compound_order; 141 atomic_t compound_mapcount; 142 unsigned int compound_nr; /* 1 << compound_order */ 143 }; 144 struct { /* Second tail page of compound page */ 145 unsigned long _compound_pad_1; /* compound_head */ 146 atomic_t hpage_pinned_refcount; 147 /* For both global and memcg */ 148 struct list_head deferred_list; 149 }; 150 struct { /* Page table pages */ 151 unsigned long _pt_pad_1; /* compound_head */ 152 union { 153 pgtable_t pmd_huge_pte; /* protected by page->ptl */ > 154 pmd_t *pmd; /* PTE page only */ 155 }; 156 unsigned long _pt_pad_2; /* mapping */ 157 union { 158 struct mm_struct *pt_mm; /* x86 pgds only */ 159 atomic_t pt_frag_refcount; /* powerpc */ 160 atomic_t pte_refcount; /* PTE page only */ 161 }; 162 #if ALLOC_SPLIT_PTLOCKS 163 spinlock_t *ptl; 164 #else 165 spinlock_t ptl; 166 #endif 167 }; 168 struct { /* ZONE_DEVICE pages */ 169 /** @pgmap: Points to the hosting device page map. */ 170 struct dev_pagemap *pgmap; 171 void *zone_device_data; 172 /* 173 * ZONE_DEVICE private pages are counted as being 174 * mapped so the next 3 words hold the mapping, index, 175 * and private fields from the source anonymous or 176 * page cache page while the page is migrated to device 177 * private memory. 178 * ZONE_DEVICE MEMORY_DEVICE_FS_DAX pages also 179 * use the mapping, index, and private fields when 180 * pmem backed DAX files are mapped. 181 */ 182 }; 183 184 /** @rcu_head: You can use this to free a page by RCU. */ 185 struct rcu_head rcu_head; 186 }; 187 188 union { /* This union is 4 bytes in size. */ 189 /* 190 * If the page can be mapped to userspace, encodes the number 191 * of times this page is referenced by a page table. 192 */ 193 atomic_t _mapcount; 194 195 /* 196 * If the page is neither PageSlab nor mappable to userspace, 197 * the value stored here may help determine what this page 198 * is used for. See page-flags.h for a list of page types 199 * which are currently stored here. 200 */ 201 unsigned int page_type; 202 203 unsigned int active; /* SLAB */ 204 int units; /* SLOB */ 205 }; 206 207 /* Usage count. *DO NOT USE DIRECTLY*. See page_ref.h */ 208 atomic_t _refcount; 209 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip