Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on shuah-kselftest/next] [also build test ERROR on linus/master v6.1-rc1 next-20221020] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/alexlzhu-fb-com/THP-Shrinker/20221019-114447 base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next patch link: https://lore.kernel.org/r/ff9fd618be7b9cb48d36e3635c89a2fe0b7fca65.1666150565.git.alexlzhu%40fb.com patch subject: [PATCH v4 2/3] mm: changes to split_huge_page() to free zero filled tail pages config: parisc-defconfig compiler: hppa-linux-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://github.com/intel-lab-lkp/linux/commit/40ddae5e98a86e8f5e168cac6056d2353ec40c1f git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review alexlzhu-fb-com/THP-Shrinker/20221019-114447 git checkout 40ddae5e98a86e8f5e168cac6056d2353ec40c1f # 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=parisc 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/migrate.c: In function 'try_to_unmap_clean': mm/migrate.c:206:32: error: 'THP_SPLIT_REMAP_READONLY_ZERO_PAGE' undeclared (first use in this function) 206 | count_vm_event(THP_SPLIT_REMAP_READONLY_ZERO_PAGE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/migrate.c:206:32: note: each undeclared identifier is reported only once for each function it appears in >> mm/migrate.c:211:24: error: 'THP_SPLIT_UNMAP' undeclared (first use in this function) 211 | count_vm_event(THP_SPLIT_UNMAP); | ^~~~~~~~~~~~~~~ vim +/THP_SPLIT_UNMAP +211 mm/migrate.c 171 172 static bool try_to_unmap_clean(struct page_vma_mapped_walk *pvmw, struct page *page) 173 { 174 void *addr; 175 bool dirty; 176 pte_t newpte; 177 178 VM_BUG_ON_PAGE(PageCompound(page), page); 179 VM_BUG_ON_PAGE(!PageAnon(page), page); 180 VM_BUG_ON_PAGE(!PageLocked(page), page); 181 VM_BUG_ON_PAGE(pte_present(*pvmw->pte), page); 182 183 if (PageMlocked(page) || (pvmw->vma->vm_flags & VM_LOCKED)) 184 return false; 185 186 /* 187 * The pmd entry mapping the old thp was flushed and the pte mapping 188 * this subpage has been non present. Therefore, this subpage is 189 * inaccessible. We don't need to remap it if it contains only zeros. 190 */ 191 addr = kmap_local_page(page); 192 dirty = memchr_inv(addr, 0, PAGE_SIZE); 193 kunmap_local(addr); 194 195 if (dirty) 196 return false; 197 198 pte_clear_not_present_full(pvmw->vma->vm_mm, pvmw->address, pvmw->pte, false); 199 200 if (userfaultfd_armed(pvmw->vma)) { 201 newpte = pte_mkspecial(pfn_pte(page_to_pfn(ZERO_PAGE(pvmw->address)), 202 pvmw->vma->vm_page_prot)); 203 ptep_clear_flush(pvmw->vma, pvmw->address, pvmw->pte); 204 set_pte_at(pvmw->vma->vm_mm, pvmw->address, pvmw->pte, newpte); 205 dec_mm_counter(pvmw->vma->vm_mm, MM_ANONPAGES); 206 count_vm_event(THP_SPLIT_REMAP_READONLY_ZERO_PAGE); 207 return true; 208 } 209 210 dec_mm_counter(pvmw->vma->vm_mm, mm_counter(page)); > 211 count_vm_event(THP_SPLIT_UNMAP); 212 return true; 213 } 214 -- 0-DAY CI Kernel Test Service https://01.org/lkp