Hi Baolin, I love your patch! Yet something to improve: [auto build test ERROR on next-20211220] [cannot apply to hnaz-mm/master linux/master linus/master v5.16-rc6 v5.16-rc5 v5.16-rc4 v5.16-rc6] [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/Baolin-Wang/Add-a-new-scheme-to-support-demotion-on-tiered-memory-system/20211221-172017 base: 07f8c60fe60f84977dc815ec8a6b1100827c34dd config: arc-randconfig-r043-20211222 (https://download.01.org/0day-ci/archive/20211222/202112221923.4m9tlPoy-lkp@xxxxxxxxx/config) compiler: arc-elf-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/ed1c1ea9c5b5ea81916c10e50c4a1613bce4b5a9 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Baolin-Wang/Add-a-new-scheme-to-support-demotion-on-tiered-memory-system/20211221-172017 git checkout ed1c1ea9c5b5ea81916c10e50c4a1613bce4b5a9 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): mm/damon/vaddr.c: In function 'damos_migrate_pmd_entry': >> mm/damon/vaddr.c:635:14: error: implicit declaration of function 'vma_migratable'; did you mean 'HPageMigratable'? [-Werror=implicit-function-declaration] 635 | if (!vma_migratable(vma)) | ^~~~~~~~~~~~~~ | HPageMigratable >> mm/damon/vaddr.c:648:39: error: implicit declaration of function 'pmd_pfn'; did you mean 'pmd_off'? [-Werror=implicit-function-declaration] 648 | page = damon_get_page(pmd_pfn(*pmd)); | ^~~~~~~ | pmd_off cc1: some warnings being treated as errors vim +635 mm/damon/vaddr.c 625 626 static int damos_migrate_pmd_entry(pmd_t *pmd, unsigned long addr, 627 unsigned long end, struct mm_walk *walk) 628 { 629 struct vm_area_struct *vma = walk->vma; 630 struct list_head *demote_list = walk->private; 631 spinlock_t *ptl; 632 struct page *page; 633 pte_t *pte, *mapped_pte; 634 > 635 if (!vma_migratable(vma)) 636 return -EFAULT; 637 638 ptl = pmd_trans_huge_lock(pmd, vma); 639 if (ptl) { 640 /* Bail out if THP migration is not supported. */ 641 if (!thp_migration_supported()) 642 goto thp_out; 643 644 /* If the THP pte is under migration, do not bother it. */ 645 if (unlikely(is_pmd_migration_entry(*pmd))) 646 goto thp_out; 647 > 648 page = damon_get_page(pmd_pfn(*pmd)); 649 if (!page) 650 goto thp_out; 651 652 damos_isolate_page(page, demote_list); 653 654 put_page(page); 655 thp_out: 656 spin_unlock(ptl); 657 return 0; 658 } 659 660 /* regular page handling */ 661 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) 662 return -EINVAL; 663 664 mapped_pte = pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl); 665 for (; addr != end; pte++, addr += PAGE_SIZE) { 666 if (pte_none(*pte) || !pte_present(*pte)) 667 continue; 668 669 page = damon_get_page(pte_pfn(*pte)); 670 if (!page) 671 continue; 672 673 damos_isolate_page(page, demote_list); 674 put_page(page); 675 } 676 pte_unmap_unlock(mapped_pte, ptl); 677 cond_resched(); 678 679 return 0; 680 } 681 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx