Re: [PATCH 3/3] mm: oom: show unreclaimable slab info when unreclaimable slabs > user memory

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

 



Hi Yang,

[auto build test ERROR on mmotm/master]
[also build test ERROR on v4.14-rc3 next-20170929]
[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/Yang-Shi/oom-capture-unreclaimable-slab-info-in-oom-message/20171007-173639
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: h8300-h8300h-sim_defconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=h8300 

All errors (new ones prefixed by >>):

   mm/slab_common.o: In function `dump_unreclaimable_slab':
>> mm/slab_common.c:1298: undefined reference to `get_slabinfo'

vim +1298 mm/slab_common.c

  1272	
  1273	void dump_unreclaimable_slab(void)
  1274	{
  1275		struct kmem_cache *s, *s2;
  1276		struct slabinfo sinfo;
  1277	
  1278		/*
  1279		 * Here acquiring slab_mutex is risky since we don't prefer to get
  1280		 * sleep in oom path. But, without mutex hold, it may introduce a
  1281		 * risk of crash.
  1282		 * Use mutex_trylock to protect the list traverse, dump nothing
  1283		 * without acquiring the mutex.
  1284		 */
  1285		if (!mutex_trylock(&slab_mutex)) {
  1286			pr_warn("excessive unreclaimable slab but cannot dump stats\n");
  1287			return;
  1288		}
  1289	
  1290		pr_info("Unreclaimable slab info:\n");
  1291		pr_info("Name                      Used          Total\n");
  1292	
  1293		list_for_each_entry_safe(s, s2, &slab_caches, list) {
  1294			if (!is_root_cache(s) || (s->flags & SLAB_RECLAIM_ACCOUNT))
  1295				continue;
  1296	
  1297			memset(&sinfo, 0, sizeof(sinfo));
> 1298			get_slabinfo(s, &sinfo);
  1299	
  1300			if (sinfo.num_objs > 0)
  1301				pr_info("%-17s %10luKB %10luKB\n", cache_name(s),
  1302					(sinfo.active_objs * s->size) / 1024,
  1303					(sinfo.num_objs * s->size) / 1024);
  1304		}
  1305		mutex_unlock(&slab_mutex);
  1306	}
  1307	

---
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]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux