Hi Zach, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20220502] [cannot apply to hnaz-mm/master rostedt-trace/for-next deller-parisc/for-next arnd-asm-generic/master linus/master v5.18-rc5 v5.18-rc4 v5.18-rc3 v5.18-rc5] [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/intel-lab-lkp/linux/commits/Zach-O-Keefe/mm-khugepaged-record-SCAN_PMD_MAPPED-when-scan_pmd-finds-THP/20220503-031727 base: 9f9b9a2972eb8dcaad09d826c5c6d7488eaca3e6 config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220503/202205031435.JEToTgim-lkp@xxxxxxxxx/config) compiler: gcc-11 (Debian 11.2.0-20) 11.2.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/0d006aeaf99be94a0dcb727cb6540195f13fd9c3 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Zach-O-Keefe/mm-khugepaged-record-SCAN_PMD_MAPPED-when-scan_pmd-finds-THP/20220503-031727 git checkout 0d006aeaf99be94a0dcb727cb6540195f13fd9c3 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): mm/khugepaged.c: In function 'alloc_charge_hpage': >> mm/khugepaged.c:1091:36: warning: passing argument 1 of 'khugepaged_alloc_page' makes pointer from integer without a cast [-Wint-conversion] 1091 | if (!khugepaged_alloc_page(gfp, node, cc)) | ^~~ | | | gfp_t {aka unsigned int} mm/khugepaged.c:949:49: note: expected 'struct page **' but argument is of type 'gfp_t' {aka 'unsigned int'} 949 | static bool khugepaged_alloc_page(struct page **hpage, gfp_t gfp, int node) | ~~~~~~~~~~~~~~^~~~~ >> mm/khugepaged.c:1091:47: warning: passing argument 3 of 'khugepaged_alloc_page' makes integer from pointer without a cast [-Wint-conversion] 1091 | if (!khugepaged_alloc_page(gfp, node, cc)) | ^~ | | | struct collapse_control * mm/khugepaged.c:949:71: note: expected 'int' but argument is of type 'struct collapse_control *' 949 | static bool khugepaged_alloc_page(struct page **hpage, gfp_t gfp, int node) | ~~~~^~~~ vim +/khugepaged_alloc_page +1091 mm/khugepaged.c 1074 1075 static int alloc_charge_hpage(struct mm_struct *mm, struct collapse_control *cc) 1076 { 1077 #ifdef CONFIG_NUMA 1078 const struct cpumask *cpumask; 1079 #endif 1080 gfp_t gfp = alloc_hugepage_khugepaged_gfpmask() | __GFP_THISNODE; 1081 int node = khugepaged_find_target_node(cc); 1082 1083 #ifdef CONFIG_NUMA 1084 /* sched to specified node before huge page memory copy */ 1085 if (task_node(current) != node) { 1086 cpumask = cpumask_of_node(node); 1087 if (!cpumask_empty(cpumask)) 1088 set_cpus_allowed_ptr(current, cpumask); 1089 } 1090 #endif > 1091 if (!khugepaged_alloc_page(gfp, node, cc)) 1092 return SCAN_ALLOC_HUGE_PAGE_FAIL; 1093 if (unlikely(mem_cgroup_charge(page_folio(cc->hpage), mm, gfp))) 1094 return SCAN_CGROUP_CHARGE_FAIL; 1095 count_memcg_page_event(cc->hpage, THP_COLLAPSE_ALLOC); 1096 return SCAN_SUCCEED; 1097 } 1098 -- 0-DAY CI Kernel Test Service https://01.org/lkp