Re: [PATCH 1/2] mm: revert mem_cgroup_put() introduction

From: kbuild test robot
Date: Fri Jun 22 2018 - 20:47:28 EST


Hi Roman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180622]
[cannot apply to linus/master v4.18-rc1 v4.17 v4.17-rc7 v4.18-rc1]
[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/Roman-Gushchin/mm-revert-mem_cgroup_put-introduction/20180623-080942
config: i386-tinyconfig (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=i386

Note: the linux-review/Roman-Gushchin/mm-revert-mem_cgroup_put-introduction/20180623-080942 HEAD 76214420a3e55c42797f5f22cb04d1a3331c1ece builds fine.
It only hurts bisectibility.

All errors (new ones prefixed by >>):

mm/oom_kill.c: In function 'oom_kill_memcg_victim':
>> mm/oom_kill.c:1026:2: error: implicit declaration of function 'mem_cgroup_put'; did you mean 'mem_cgroup_id'? [-Werror=implicit-function-declaration]
mem_cgroup_put(oc->chosen_memcg);
^~~~~~~~~~~~~~
mem_cgroup_id
cc1: some warnings being treated as errors

vim +1026 mm/oom_kill.c

4ac2c83a Roman Gushchin 2018-06-15 997
7388c5c4 Roman Gushchin 2018-06-15 998 static bool oom_kill_memcg_victim(struct oom_control *oc)
7388c5c4 Roman Gushchin 2018-06-15 999 {
4ac2c83a Roman Gushchin 2018-06-15 1000 if (oc->chosen_memcg == NULL || oc->chosen_memcg == INFLIGHT_VICTIM)
4ac2c83a Roman Gushchin 2018-06-15 1001 return oc->chosen_memcg;
4ac2c83a Roman Gushchin 2018-06-15 1002
7388c5c4 Roman Gushchin 2018-06-15 1003 /*
7388c5c4 Roman Gushchin 2018-06-15 1004 * If memory.oom_group is set, kill all tasks belonging to the sub-tree
7388c5c4 Roman Gushchin 2018-06-15 1005 * of the chosen memory cgroup, otherwise kill the task with the biggest
7388c5c4 Roman Gushchin 2018-06-15 1006 * memory footprint.
7388c5c4 Roman Gushchin 2018-06-15 1007 */
7388c5c4 Roman Gushchin 2018-06-15 1008 if (mem_cgroup_oom_group(oc->chosen_memcg)) {
7388c5c4 Roman Gushchin 2018-06-15 1009 mem_cgroup_scan_tasks(oc->chosen_memcg, oom_kill_memcg_member,
7388c5c4 Roman Gushchin 2018-06-15 1010 NULL);
7388c5c4 Roman Gushchin 2018-06-15 1011 /* We have one or more terminating processes at this point. */
7388c5c4 Roman Gushchin 2018-06-15 1012 oc->chosen_task = INFLIGHT_VICTIM;
7388c5c4 Roman Gushchin 2018-06-15 1013 } else {
4ac2c83a Roman Gushchin 2018-06-15 1014 oc->chosen_points = 0;
4ac2c83a Roman Gushchin 2018-06-15 1015 oc->chosen_task = NULL;
4ac2c83a Roman Gushchin 2018-06-15 1016 mem_cgroup_scan_tasks(oc->chosen_memcg, oom_evaluate_task, oc);
4ac2c83a Roman Gushchin 2018-06-15 1017
7388c5c4 Roman Gushchin 2018-06-15 1018 if (oc->chosen_task == NULL ||
7388c5c4 Roman Gushchin 2018-06-15 1019 oc->chosen_task == INFLIGHT_VICTIM)
4ac2c83a Roman Gushchin 2018-06-15 1020 goto out;
4ac2c83a Roman Gushchin 2018-06-15 1021
4ac2c83a Roman Gushchin 2018-06-15 1022 __oom_kill_process(oc->chosen_task);
7388c5c4 Roman Gushchin 2018-06-15 1023 }
4ac2c83a Roman Gushchin 2018-06-15 1024
4ac2c83a Roman Gushchin 2018-06-15 1025 out:
4ac2c83a Roman Gushchin 2018-06-15 @1026 mem_cgroup_put(oc->chosen_memcg);
4ac2c83a Roman Gushchin 2018-06-15 1027 return oc->chosen_task;
4ac2c83a Roman Gushchin 2018-06-15 1028 }
4ac2c83a Roman Gushchin 2018-06-15 1029

:::::: The code at line 1026 was first introduced by commit
:::::: 4ac2c83a8e8a0708278b6f2bb44dc4c880fdcaf6 mm, oom: cgroup-aware OOM killer

:::::: TO: Roman Gushchin <guro@xxxxxx>
:::::: CC: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip