* Re: [PATCH v1] hugetlb: Add hugetlb.*.numa_stat file
[not found] <20211019215437.2348421-1-almasrymina@google.com>
@ 2021-10-20 18:41 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-20 18:41 UTC (permalink / raw)
To: Mina Almasry
Cc: llvm, kbuild-all, Mina Almasry, Mike Kravetz, Andrew Morton,
Linux Memory Management List, Shuah Khan, Miaohe Lin,
Oscar Salvador, Michal Hocko, Muchun Song, David Rientjes
[-- Attachment #1: Type: text/plain, Size: 3723 bytes --]
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@intel.com>
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@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33235 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-20 18:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211019215437.2348421-1-almasrymina@google.com>
2021-10-20 18:41 ` [PATCH v1] hugetlb: Add hugetlb.*.numa_stat file kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox