Re: [PATCH v2 04/12] mm: Assign memcg-aware shrinkers bitmap to memcg

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

 



Hi Kirill,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mmotm/master]
[also build test WARNING on next-20180418]
[cannot apply to v4.17-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/Kirill-Tkhai/Improve-shrink_slab-scalability-old-complexity-was-O-n-2-new-is-O-n/20180418-184501
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: x86_64-randconfig-x011-201815 (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 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   mm/memcontrol.c: In function 'expand_shrinker_maps':
>> mm/memcontrol.c:402:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return ret;
            ^~~

vim +/ret +402 mm/memcontrol.c

   377	
   378	int expand_shrinker_maps(int old_nr, int nr)
   379	{
   380		int id, size, old_size, node, ret;
   381		struct mem_cgroup *memcg;
   382	
   383		old_size = old_nr / BITS_PER_BYTE;
   384		size = nr / BITS_PER_BYTE;
   385	
   386		down_write(&shrinkers_max_nr_rwsem);
   387		for_each_node(node) {
   388			idr_for_each_entry(&mem_cgroup_idr, memcg, id) {
   389				if (id == 1)
   390					memcg = NULL;
   391				ret = memcg_expand_maps(memcg, node, size, old_size);
   392				if (ret)
   393					goto unlock;
   394			}
   395	
   396			/* root_mem_cgroup is not initialized yet */
   397			if (id == 0)
   398				ret = memcg_expand_maps(NULL, node, size, old_size);
   399		}
   400	unlock:
   401		up_write(&shrinkers_max_nr_rwsem);
 > 402		return ret;
   403	}
   404	#else /* CONFIG_SLOB */
   405	static void get_shrinkers_max_nr(void) { }
   406	static void put_shrinkers_max_nr(void) { }
   407	

---
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