Re: [patch -mm 4/6] mm, memcg: evaluate root and leaf memcgs fairly on oom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20180309]
[cannot apply to linus/master v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5]
[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/David-Rientjes/rewrite-cgroup-aware-oom-killer-for-general-use/20180318-222124
config: i386-randconfig-s0-201811 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/memcontrol.c: In function 'memcg_oom_badness':
>> mm/memcontrol.c:2640:50: error: 'nr_swap_pages' undeclared (first use in this function)
      points += total_swap_pages - atomic_long_read(&nr_swap_pages);
                                                     ^~~~~~~~~~~~~
   mm/memcontrol.c:2640:50: note: each undeclared identifier is reported only once for each function it appears in
   At top level:
   mm/memcontrol.c:706:27: warning: 'get_mem_cgroup' defined but not used [-Wunused-function]
    static struct mem_cgroup *get_mem_cgroup(struct mem_cgroup *memcg)
                              ^~~~~~~~~~~~~~

vim +/nr_swap_pages +2640 mm/memcontrol.c

  2610	
  2611	static long memcg_oom_badness(struct mem_cgroup *memcg,
  2612				      const nodemask_t *nodemask)
  2613	{
  2614		const bool is_root_memcg = memcg == root_mem_cgroup;
  2615		long points = 0;
  2616		int nid;
  2617		pg_data_t *pgdat;
  2618	
  2619		for_each_node_state(nid, N_MEMORY) {
  2620			if (nodemask && !node_isset(nid, *nodemask))
  2621				continue;
  2622	
  2623			pgdat = NODE_DATA(nid);
  2624			if (is_root_memcg) {
  2625				points += node_page_state(pgdat, NR_ACTIVE_ANON) +
  2626					  node_page_state(pgdat, NR_INACTIVE_ANON);
  2627				points += node_page_state(pgdat, NR_SLAB_UNRECLAIMABLE);
  2628			} else {
  2629				points += mem_cgroup_node_nr_lru_pages(memcg, nid,
  2630								       LRU_ALL_ANON);
  2631				points += lruvec_page_state(mem_cgroup_lruvec(pgdat, memcg),
  2632							    NR_SLAB_UNRECLAIMABLE);
  2633			}
  2634		}
  2635	
  2636		if (is_root_memcg) {
  2637			points += global_zone_page_state(NR_KERNEL_STACK_KB) /
  2638					(PAGE_SIZE / 1024);
  2639			points += atomic_long_read(&total_sock_pages);
> 2640			points += total_swap_pages - atomic_long_read(&nr_swap_pages);
  2641		} else {
  2642			points += memcg_page_state(memcg, MEMCG_KERNEL_STACK_KB) /
  2643					(PAGE_SIZE / 1024);
  2644			points += memcg_page_state(memcg, MEMCG_SOCK);
  2645			points += memcg_page_state(memcg, MEMCG_SWAP);
  2646		}
  2647		return points;
  2648	}
  2649	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux