Hi Mina, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on hnaz-mm/master] [also build test WARNING on tj-cgroup/for-next linus/master v5.15-rc6 next-20211020] [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/Mina-Almasry/hugetlb-Add-hugetlb-numa_stat-file/20211020-055543 base: https://github.com/hnaz/linux-mm master config: x86_64-randconfig-a004-20211019 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9660563950aaed54020bfdf0be07e7096a9553e4) 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/cdac71b7be0126a6f559110105cb7baff1b6552b git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mina-Almasry/hugetlb-Add-hugetlb-numa_stat-file/20211020-055543 git checkout cdac71b7be0126a6f559110105cb7baff1b6552b # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 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/hugetlb_cgroup.c:469:6: warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat] (u64)page_counter_read(&h_cg->hugepage[idx]) * PAGE_SIZE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. vim +469 mm/hugetlb_cgroup.c 440 441 static int hugetlb_cgroup_read_numa_stat(struct seq_file *seq, void *dummy) 442 { 443 int nid; 444 struct cftype *cft = seq_cft(seq); 445 int idx = MEMFILE_IDX(cft->private); 446 bool legacy = MEMFILE_ATTR(cft->private); 447 struct hugetlb_cgroup *h_cg = hugetlb_cgroup_from_css(seq_css(seq)); 448 struct cgroup_subsys_state *css; 449 unsigned long usage; 450 451 if (legacy) { 452 /* Add up usage across all nodes for the non-hierarchical total. */ 453 usage = 0; 454 for_each_node_state(nid, N_MEMORY) 455 usage += h_cg->nodeinfo[nid]->usage[idx]; 456 seq_printf(seq, "total=%lu", usage); 457 458 /* Simply print the per-node usage for the non-hierarchical total. */ 459 for_each_node_state(nid, N_MEMORY) 460 seq_printf(seq, " N%d=%lu", nid, 461 h_cg->nodeinfo[nid]->usage[idx]); 462 seq_putc(seq, '\n'); 463 } 464 465 /* The hierarchical total is pretty much the value recorded by the 466 * counter, so use that. 467 */ 468 seq_printf(seq, "%stotal=%lu", legacy ? "hierarichal_" : "", > 469 (u64)page_counter_read(&h_cg->hugepage[idx]) * PAGE_SIZE); 470 471 /* For each node, transverse the css tree to obtain the hierarichal 472 * node usage. 473 */ 474 for_each_node_state(nid, N_MEMORY) { 475 usage = 0; 476 rcu_read_lock(); 477 css_for_each_descendant_pre(css, &h_cg->css) { 478 usage += hugetlb_cgroup_from_css(css) 479 ->nodeinfo[nid] 480 ->usage[idx]; 481 } 482 rcu_read_unlock(); 483 seq_printf(seq, " N%d=%lu", nid, usage); 484 } 485 486 seq_putc(seq, '\n'); 487 488 return 0; 489 } 490 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip