Re: [PATCH v2 1/1] mm: initialize pages on demand during boot

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

 



Hi Pavel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mmotm/master]
[also build test WARNING on next-20180209]
[cannot apply to v4.15]
[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/Pavel-Tatashin/mm-initialize-pages-on-demand-during-boot/20180210-125104
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: i386-randconfig-x018-201805 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:18:0,
                    from arch/x86/include/asm/bug.h:82,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from mm/page_alloc.c:18:
   mm/page_alloc.c: In function 'free_area_init_node':
   include/linux/kernel.h:792:16: warning: comparison of distinct pointer types lacks a cast
     (void) (&min1 == &min2);   \
                   ^
   include/linux/kernel.h:801:2: note: in expansion of macro '__min'
     __min(typeof(x), typeof(y),   \
     ^~~~~
>> mm/page_alloc.c:6357:29: note: in expansion of macro 'min'
     pgdat->static_init_pgcnt = min(PAGES_PER_SECTION,
                                ^~~

vim +/min +6357 mm/page_alloc.c

  6325	
  6326	void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
  6327			unsigned long node_start_pfn, unsigned long *zholes_size)
  6328	{
  6329		pg_data_t *pgdat = NODE_DATA(nid);
  6330		unsigned long start_pfn = 0;
  6331		unsigned long end_pfn = 0;
  6332	
  6333		/* pg_data_t should be reset to zero when it's allocated */
  6334		WARN_ON(pgdat->nr_zones || pgdat->kswapd_classzone_idx);
  6335	
  6336		pgdat->node_id = nid;
  6337		pgdat->node_start_pfn = node_start_pfn;
  6338		pgdat->per_cpu_nodestats = NULL;
  6339	#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
  6340		get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
  6341		pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid,
  6342			(u64)start_pfn << PAGE_SHIFT,
  6343			end_pfn ? ((u64)end_pfn << PAGE_SHIFT) - 1 : 0);
  6344	#else
  6345		start_pfn = node_start_pfn;
  6346	#endif
  6347		calculate_node_totalpages(pgdat, start_pfn, end_pfn,
  6348					  zones_size, zholes_size);
  6349	
  6350		alloc_node_mem_map(pgdat);
  6351	
  6352	#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
  6353		/*
  6354		 * We start only with one section of pages, more pages are added as
  6355		 * needed until the rest of deferred pages are initialized.
  6356		 */
> 6357		pgdat->static_init_pgcnt = min(PAGES_PER_SECTION,
  6358					       pgdat->node_spanned_pages);
  6359		pgdat->first_deferred_pfn = ULONG_MAX;
  6360	#endif
  6361		free_area_init_core(pgdat);
  6362	}
  6363	

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