Re: [PATCH] Add the memcg print oom info for system oom

From: kbuild test robot
Date: Sat May 19 2018 - 16:23:51 EST


Hi yuzhoujian,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mmotm/master]
[also build test ERROR on v4.17-rc5 next-20180517]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/ufo19890607/Add-the-memcg-print-oom-info-for-system-oom/20180520-041924
base: git://git.cmpxchg.org/linux-mmotm.git master
config: x86_64-randconfig-x003-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All error/warnings (new ones prefixed by >>):

mm/oom_kill.c: In function 'dump_header':
>> mm/oom_kill.c:436:29: error: implicit declaration of function 'mem_cgroup_from_task'; did you mean 'mem_cgroup_from_id'? [-Werror=implicit-function-declaration]
mem_cgroup_print_oom_info(mem_cgroup_from_task(p), p);
^~~~~~~~~~~~~~~~~~~~
mem_cgroup_from_id
>> mm/oom_kill.c:436:29: warning: passing argument 1 of 'mem_cgroup_print_oom_info' makes pointer from integer without a cast [-Wint-conversion]
In file included from include/linux/swap.h:9:0,
from mm/oom_kill.c:28:
include/linux/memcontrol.h:932:1: note: expected 'struct mem_cgroup *' but argument is of type 'int'
mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +436 mm/oom_kill.c

421
422 static void dump_header(struct oom_control *oc, struct task_struct *p)
423 {
424 pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), nodemask=%*pbl, order=%d, oom_score_adj=%hd\n",
425 current->comm, oc->gfp_mask, &oc->gfp_mask,
426 nodemask_pr_args(oc->nodemask), oc->order,
427 current->signal->oom_score_adj);
428 if (!IS_ENABLED(CONFIG_COMPACTION) && oc->order)
429 pr_warn("COMPACTION is disabled!!!\n");
430
431 cpuset_print_current_mems_allowed();
432 dump_stack();
433 if (is_memcg_oom(oc))
434 mem_cgroup_print_oom_info(oc->memcg, p);
435 else {
> 436 mem_cgroup_print_oom_info(mem_cgroup_from_task(p), p);
437 show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
438 if (is_dump_unreclaim_slabs())
439 dump_unreclaimable_slab();
440 }
441 if (sysctl_oom_dump_tasks)
442 dump_tasks(oc->memcg, oc->nodemask);
443 }
444

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip