lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201803190226.k5l4Bffw%fengguang.wu@intel.com>
Date:   Mon, 19 Mar 2018 02:18:37 +0800
From:   kbuild test robot <lkp@...el.com>
To:     David Rientjes <rientjes@...gle.com>
Cc:     kbuild-all@...org, Andrew Morton <akpm@...ux-foundation.org>,
        Roman Gushchin <guro@...com>, Michal Hocko <mhocko@...nel.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Tejun Heo <tj@...nel.org>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [patch -mm 4/6] mm, memcg: evaluate root and leaf memcgs fairly
 on oom

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

Download attachment ".config.gz" of type "application/gzip" (27961 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ