[memcg:since-4.12 539/540] mm/compaction.c:469:8: error: implicit declaration of function 'pageblock_skip_persistent'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git since-4.12
head:   ba5e8c23db5729ebdbafad983b07434c829cf5b6
commit: 500539d3686a835f6a9740ffc38bed5d74951a64 [539/540] debugobjects: make kmemleak ignore debug objects
config: i386-randconfig-s0-08141822 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 500539d3686a835f6a9740ffc38bed5d74951a64
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/compaction.c: In function 'isolate_freepages_block':
>> mm/compaction.c:469:8: error: implicit declaration of function 'pageblock_skip_persistent' [-Werror=implicit-function-declaration]
       if (pageblock_skip_persistent(page, order)) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/compaction.c:470:5: error: implicit declaration of function 'set_pageblock_skip' [-Werror=implicit-function-declaration]
        set_pageblock_skip(page);
        ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/pageblock_skip_persistent +469 mm/compaction.c

be976572 Vlastimil Babka   2014-06-04  417  
c67fe375 Mel Gorman        2012-08-21  418  /*
9e4be470 Jerome Marchand   2013-11-12  419   * Isolate free pages onto a private freelist. If @strict is true, will abort
9e4be470 Jerome Marchand   2013-11-12  420   * returning 0 on any invalid PFNs or non-free pages inside of the pageblock
9e4be470 Jerome Marchand   2013-11-12  421   * (even though it may still end up isolating some pages).
85aa125f Michal Nazarewicz 2012-01-30  422   */
f40d1e42 Mel Gorman        2012-10-08  423  static unsigned long isolate_freepages_block(struct compact_control *cc,
e14c720e Vlastimil Babka   2014-10-09  424  				unsigned long *start_pfn,
85aa125f Michal Nazarewicz 2012-01-30  425  				unsigned long end_pfn,
85aa125f Michal Nazarewicz 2012-01-30  426  				struct list_head *freelist,
85aa125f Michal Nazarewicz 2012-01-30  427  				bool strict)
748446bb Mel Gorman        2010-05-24  428  {
b7aba698 Mel Gorman        2011-01-13  429  	int nr_scanned = 0, total_isolated = 0;
bb13ffeb Mel Gorman        2012-10-08  430  	struct page *cursor, *valid_page = NULL;
b8b2d825 Xiubo Li          2014-10-09  431  	unsigned long flags = 0;
f40d1e42 Mel Gorman        2012-10-08  432  	bool locked = false;
e14c720e Vlastimil Babka   2014-10-09  433  	unsigned long blockpfn = *start_pfn;
66c64223 Joonsoo Kim       2016-07-26  434  	unsigned int order;
748446bb Mel Gorman        2010-05-24  435  
748446bb Mel Gorman        2010-05-24  436  	cursor = pfn_to_page(blockpfn);
748446bb Mel Gorman        2010-05-24  437  
f40d1e42 Mel Gorman        2012-10-08  438  	/* Isolate free pages. */
748446bb Mel Gorman        2010-05-24  439  	for (; blockpfn < end_pfn; blockpfn++, cursor++) {
66c64223 Joonsoo Kim       2016-07-26  440  		int isolated;
748446bb Mel Gorman        2010-05-24  441  		struct page *page = cursor;
748446bb Mel Gorman        2010-05-24  442  
8b44d279 Vlastimil Babka   2014-10-09  443  		/*
8b44d279 Vlastimil Babka   2014-10-09  444  		 * Periodically drop the lock (if held) regardless of its
8b44d279 Vlastimil Babka   2014-10-09  445  		 * contention, to give chance to IRQs. Abort if fatal signal
8b44d279 Vlastimil Babka   2014-10-09  446  		 * pending or async compaction detects need_resched()
8b44d279 Vlastimil Babka   2014-10-09  447  		 */
8b44d279 Vlastimil Babka   2014-10-09  448  		if (!(blockpfn % SWAP_CLUSTER_MAX)
8b44d279 Vlastimil Babka   2014-10-09  449  		    && compact_unlock_should_abort(&cc->zone->lock, flags,
8b44d279 Vlastimil Babka   2014-10-09  450  								&locked, cc))
8b44d279 Vlastimil Babka   2014-10-09  451  			break;
8b44d279 Vlastimil Babka   2014-10-09  452  
b7aba698 Mel Gorman        2011-01-13  453  		nr_scanned++;
f40d1e42 Mel Gorman        2012-10-08  454  		if (!pfn_valid_within(blockpfn))
2af120bc Laura Abbott      2014-03-10  455  			goto isolate_fail;
2af120bc Laura Abbott      2014-03-10  456  
bb13ffeb Mel Gorman        2012-10-08  457  		if (!valid_page)
bb13ffeb Mel Gorman        2012-10-08  458  			valid_page = page;
9fcd6d2e Vlastimil Babka   2015-09-08  459  
9fcd6d2e Vlastimil Babka   2015-09-08  460  		/*
9fcd6d2e Vlastimil Babka   2015-09-08  461  		 * For compound pages such as THP and hugetlbfs, we can save
9fcd6d2e Vlastimil Babka   2015-09-08  462  		 * potentially a lot of iterations if we skip them at once.
9fcd6d2e Vlastimil Babka   2015-09-08  463  		 * The check is racy, but we can consider only valid values
9fcd6d2e Vlastimil Babka   2015-09-08  464  		 * and the only danger is skipping too much.
9fcd6d2e Vlastimil Babka   2015-09-08  465  		 */
9fcd6d2e Vlastimil Babka   2015-09-08  466  		if (PageCompound(page)) {
a93d0214 David Rientjes    2017-08-18  467  			const unsigned int order = compound_order(page);
9fcd6d2e Vlastimil Babka   2015-09-08  468  
a93d0214 David Rientjes    2017-08-18 @469  			if (pageblock_skip_persistent(page, order)) {
a93d0214 David Rientjes    2017-08-18 @470  				set_pageblock_skip(page);
a93d0214 David Rientjes    2017-08-18  471  				blockpfn = end_pfn;
a93d0214 David Rientjes    2017-08-18  472  			} else if (likely(order < MAX_ORDER)) {
a93d0214 David Rientjes    2017-08-18  473  				blockpfn += (1UL << order) - 1;
a93d0214 David Rientjes    2017-08-18  474  				cursor += (1UL << order) - 1;
9fcd6d2e Vlastimil Babka   2015-09-08  475  			}
9fcd6d2e Vlastimil Babka   2015-09-08  476  			goto isolate_fail;
9fcd6d2e Vlastimil Babka   2015-09-08  477  		}
9fcd6d2e Vlastimil Babka   2015-09-08  478  
f40d1e42 Mel Gorman        2012-10-08  479  		if (!PageBuddy(page))
2af120bc Laura Abbott      2014-03-10  480  			goto isolate_fail;
748446bb Mel Gorman        2010-05-24  481  
f40d1e42 Mel Gorman        2012-10-08  482  		/*
69b7189f Vlastimil Babka   2014-10-09  483  		 * If we already hold the lock, we can skip some rechecking.
69b7189f Vlastimil Babka   2014-10-09  484  		 * Note that if we hold the lock now, checked_pageblock was
69b7189f Vlastimil Babka   2014-10-09  485  		 * already set in some previous iteration (or strict is true),
69b7189f Vlastimil Babka   2014-10-09  486  		 * so it is correct to skip the suitable migration target
69b7189f Vlastimil Babka   2014-10-09  487  		 * recheck as well.
69b7189f Vlastimil Babka   2014-10-09  488  		 */
69b7189f Vlastimil Babka   2014-10-09  489  		if (!locked) {
69b7189f Vlastimil Babka   2014-10-09  490  			/*
f40d1e42 Mel Gorman        2012-10-08  491  			 * The zone lock must be held to isolate freepages.
f40d1e42 Mel Gorman        2012-10-08  492  			 * Unfortunately this is a very coarse lock and can be
f40d1e42 Mel Gorman        2012-10-08  493  			 * heavily contended if there are parallel allocations
f40d1e42 Mel Gorman        2012-10-08  494  			 * or parallel compactions. For async compaction do not
f40d1e42 Mel Gorman        2012-10-08  495  			 * spin on the lock and we acquire the lock as late as
f40d1e42 Mel Gorman        2012-10-08  496  			 * possible.
f40d1e42 Mel Gorman        2012-10-08  497  			 */
8b44d279 Vlastimil Babka   2014-10-09  498  			locked = compact_trylock_irqsave(&cc->zone->lock,
8b44d279 Vlastimil Babka   2014-10-09  499  								&flags, cc);
f40d1e42 Mel Gorman        2012-10-08  500  			if (!locked)
f40d1e42 Mel Gorman        2012-10-08  501  				break;
f40d1e42 Mel Gorman        2012-10-08  502  
f40d1e42 Mel Gorman        2012-10-08  503  			/* Recheck this is a buddy page under lock */
f40d1e42 Mel Gorman        2012-10-08  504  			if (!PageBuddy(page))
2af120bc Laura Abbott      2014-03-10  505  				goto isolate_fail;
69b7189f Vlastimil Babka   2014-10-09  506  		}
748446bb Mel Gorman        2010-05-24  507  
66c64223 Joonsoo Kim       2016-07-26  508  		/* Found a free page, will break it into order-0 pages */
66c64223 Joonsoo Kim       2016-07-26  509  		order = page_order(page);
66c64223 Joonsoo Kim       2016-07-26  510  		isolated = __isolate_free_page(page, order);
a4f04f2c David Rientjes    2016-06-24  511  		if (!isolated)
a4f04f2c David Rientjes    2016-06-24  512  			break;
66c64223 Joonsoo Kim       2016-07-26  513  		set_page_private(page, order);
a4f04f2c David Rientjes    2016-06-24  514  
748446bb Mel Gorman        2010-05-24  515  		total_isolated += isolated;
a4f04f2c David Rientjes    2016-06-24  516  		cc->nr_freepages += isolated;
66c64223 Joonsoo Kim       2016-07-26  517  		list_add_tail(&page->lru, freelist);
66c64223 Joonsoo Kim       2016-07-26  518  
a4f04f2c David Rientjes    2016-06-24  519  		if (!strict && cc->nr_migratepages <= cc->nr_freepages) {
932ff6bb Joonsoo Kim       2015-02-12  520  			blockpfn += isolated;
932ff6bb Joonsoo Kim       2015-02-12  521  			break;
932ff6bb Joonsoo Kim       2015-02-12  522  		}
a4f04f2c David Rientjes    2016-06-24  523  		/* Advance to the end of split page */
748446bb Mel Gorman        2010-05-24  524  		blockpfn += isolated - 1;
748446bb Mel Gorman        2010-05-24  525  		cursor += isolated - 1;
2af120bc Laura Abbott      2014-03-10  526  		continue;
2af120bc Laura Abbott      2014-03-10  527  
2af120bc Laura Abbott      2014-03-10  528  isolate_fail:
2af120bc Laura Abbott      2014-03-10  529  		if (strict)
2af120bc Laura Abbott      2014-03-10  530  			break;
2af120bc Laura Abbott      2014-03-10  531  		else
2af120bc Laura Abbott      2014-03-10  532  			continue;
2af120bc Laura Abbott      2014-03-10  533  
748446bb Mel Gorman        2010-05-24  534  	}
748446bb Mel Gorman        2010-05-24  535  
a4f04f2c David Rientjes    2016-06-24  536  	if (locked)
a4f04f2c David Rientjes    2016-06-24  537  		spin_unlock_irqrestore(&cc->zone->lock, flags);
a4f04f2c David Rientjes    2016-06-24  538  
9fcd6d2e Vlastimil Babka   2015-09-08  539  	/*
9fcd6d2e Vlastimil Babka   2015-09-08  540  	 * There is a tiny chance that we have read bogus compound_order(),
9fcd6d2e Vlastimil Babka   2015-09-08  541  	 * so be careful to not go outside of the pageblock.
9fcd6d2e Vlastimil Babka   2015-09-08  542  	 */
9fcd6d2e Vlastimil Babka   2015-09-08  543  	if (unlikely(blockpfn > end_pfn))
9fcd6d2e Vlastimil Babka   2015-09-08  544  		blockpfn = end_pfn;
9fcd6d2e Vlastimil Babka   2015-09-08  545  
e34d85f0 Joonsoo Kim       2015-02-11  546  	trace_mm_compaction_isolate_freepages(*start_pfn, blockpfn,
e34d85f0 Joonsoo Kim       2015-02-11  547  					nr_scanned, total_isolated);
e34d85f0 Joonsoo Kim       2015-02-11  548  
e14c720e Vlastimil Babka   2014-10-09  549  	/* Record how far we have got within the block */
e14c720e Vlastimil Babka   2014-10-09  550  	*start_pfn = blockpfn;
e14c720e Vlastimil Babka   2014-10-09  551  
f40d1e42 Mel Gorman        2012-10-08  552  	/*
f40d1e42 Mel Gorman        2012-10-08  553  	 * If strict isolation is requested by CMA then check that all the
f40d1e42 Mel Gorman        2012-10-08  554  	 * pages requested were isolated. If there were any failures, 0 is
f40d1e42 Mel Gorman        2012-10-08  555  	 * returned and CMA will fail.
f40d1e42 Mel Gorman        2012-10-08  556  	 */
2af120bc Laura Abbott      2014-03-10  557  	if (strict && blockpfn < end_pfn)
f40d1e42 Mel Gorman        2012-10-08  558  		total_isolated = 0;
f40d1e42 Mel Gorman        2012-10-08  559  
bb13ffeb Mel Gorman        2012-10-08  560  	/* Update the pageblock-skip if the whole pageblock was scanned */
bb13ffeb Mel Gorman        2012-10-08  561  	if (blockpfn == end_pfn)
edc2ca61 Vlastimil Babka   2014-10-09  562  		update_pageblock_skip(cc, valid_page, total_isolated, false);
bb13ffeb Mel Gorman        2012-10-08  563  
7f354a54 David Rientjes    2017-02-22  564  	cc->total_free_scanned += nr_scanned;
397487db Mel Gorman        2012-10-19  565  	if (total_isolated)
010fc29a Minchan Kim       2012-12-20  566  		count_compact_events(COMPACTISOLATED, total_isolated);
748446bb Mel Gorman        2010-05-24  567  	return total_isolated;
748446bb Mel Gorman        2010-05-24  568  }
748446bb Mel Gorman        2010-05-24  569  

:::::: The code at line 469 was first introduced by commit
:::::: a93d021466d5ab3b2598e59e3a055c577a3f120b mm, compaction: persistently skip hugetlbfs pageblocks

:::::: TO: David Rientjes <rientjes@xxxxxxxxxx>
:::::: CC: Michal Hocko <mhocko@xxxxxxxx>

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