linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [mmotm:master 77/120] mm/madvise.c:332:7: error: implicit declaration of function 'is_huge_zero_pmd'; did you mean 'is_huge_zero_pud'?
@ 2019-07-25  7:03 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-07-25  7:03 UTC (permalink / raw)
  To: Minchan Kim
  Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 5411 bytes --]

tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   79b3e476080beb7faf41bddd6c3d7059cd1a5f31
commit: 23063d3d6a3b47d555a70e9aa764ba5c49cb31bc [77/120] mm, madvise: introduce MADV_COLD
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
reproduce:
        git checkout 23063d3d6a3b47d555a70e9aa764ba5c49cb31bc
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   mm/madvise.c: In function 'madvise_cold_pte_range':
>> mm/madvise.c:332:7: error: implicit declaration of function 'is_huge_zero_pmd'; did you mean 'is_huge_zero_pud'? [-Werror=implicit-function-declaration]
      if (is_huge_zero_pmd(orig_pmd))
          ^~~~~~~~~~~~~~~~
          is_huge_zero_pud
   mm/madvise.c:367:3: error: implicit declaration of function 'test_and_clear_page_young'; did you mean 'test_and_clear_bit_le'? [-Werror=implicit-function-declaration]
      test_and_clear_page_young(page);
      ^~~~~~~~~~~~~~~~~~~~~~~~~
      test_and_clear_bit_le
   cc1: some warnings being treated as errors

vim +332 mm/madvise.c

   310	
   311	static int madvise_cold_pte_range(pmd_t *pmd, unsigned long addr,
   312					unsigned long end, struct mm_walk *walk)
   313	{
   314		struct mmu_gather *tlb = walk->private;
   315		struct mm_struct *mm = tlb->mm;
   316		struct vm_area_struct *vma = walk->vma;
   317		pte_t *orig_pte, *pte, ptent;
   318		spinlock_t *ptl;
   319		struct page *page;
   320		unsigned long next;
   321	
   322		next = pmd_addr_end(addr, end);
   323		if (pmd_trans_huge(*pmd)) {
   324			pmd_t orig_pmd;
   325	
   326			tlb_change_page_size(tlb, HPAGE_PMD_SIZE);
   327			ptl = pmd_trans_huge_lock(pmd, vma);
   328			if (!ptl)
   329				return 0;
   330	
   331			orig_pmd = *pmd;
 > 332			if (is_huge_zero_pmd(orig_pmd))
   333				goto huge_unlock;
   334	
   335			if (unlikely(!pmd_present(orig_pmd))) {
   336				VM_BUG_ON(thp_migration_supported() &&
   337						!is_pmd_migration_entry(orig_pmd));
   338				goto huge_unlock;
   339			}
   340	
   341			page = pmd_page(orig_pmd);
   342			if (next - addr != HPAGE_PMD_SIZE) {
   343				int err;
   344	
   345				if (page_mapcount(page) != 1)
   346					goto huge_unlock;
   347	
   348				get_page(page);
   349				spin_unlock(ptl);
   350				lock_page(page);
   351				err = split_huge_page(page);
   352				unlock_page(page);
   353				put_page(page);
   354				if (!err)
   355					goto regular_page;
   356				return 0;
   357			}
   358	
   359			if (pmd_young(orig_pmd)) {
   360				pmdp_invalidate(vma, addr, pmd);
   361				orig_pmd = pmd_mkold(orig_pmd);
   362	
   363				set_pmd_at(mm, addr, pmd, orig_pmd);
   364				tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
   365			}
   366	
   367			test_and_clear_page_young(page);
   368			deactivate_page(page);
   369	huge_unlock:
   370			spin_unlock(ptl);
   371			return 0;
   372		}
   373	
   374		if (pmd_trans_unstable(pmd))
   375			return 0;
   376	
   377	regular_page:
   378		tlb_change_page_size(tlb, PAGE_SIZE);
   379		orig_pte = pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
   380		flush_tlb_batched_pending(mm);
   381		arch_enter_lazy_mmu_mode();
   382		for (; addr < end; pte++, addr += PAGE_SIZE) {
   383			ptent = *pte;
   384	
   385			if (pte_none(ptent))
   386				continue;
   387	
   388			if (!pte_present(ptent))
   389				continue;
   390	
   391			page = vm_normal_page(vma, addr, ptent);
   392			if (!page)
   393				continue;
   394	
   395			/*
   396			 * Creating a THP page is expensive so split it only if we
   397			 * are sure it's worth. Split it if we are only owner.
   398			 */
   399			if (PageTransCompound(page)) {
   400				if (page_mapcount(page) != 1)
   401					break;
   402				get_page(page);
   403				if (!trylock_page(page)) {
   404					put_page(page);
   405					break;
   406				}
   407				pte_unmap_unlock(orig_pte, ptl);
   408				if (split_huge_page(page)) {
   409					unlock_page(page);
   410					put_page(page);
   411					pte_offset_map_lock(mm, pmd, addr, &ptl);
   412					break;
   413				}
   414				unlock_page(page);
   415				put_page(page);
   416				pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
   417				pte--;
   418				addr -= PAGE_SIZE;
   419				continue;
   420			}
   421	
   422			VM_BUG_ON_PAGE(PageTransCompound(page), page);
   423	
   424			if (pte_young(ptent)) {
   425				ptent = ptep_get_and_clear_full(mm, addr, pte,
   426								tlb->fullmm);
   427				ptent = pte_mkold(ptent);
   428				set_pte_at(mm, addr, pte, ptent);
   429				tlb_remove_tlb_entry(tlb, pte, addr);
   430			}
   431	
   432			/*
   433			 * We are deactivating a page for accelerating reclaiming.
   434			 * VM couldn't reclaim the page unless we clear PG_young.
   435			 * As a side effect, it makes confuse idle-page tracking
   436			 * because they will miss recent referenced history.
   437			 */
   438			test_and_clear_page_young(page);
   439			deactivate_page(page);
   440		}
   441	
   442		arch_leave_lazy_mmu_mode();
   443		pte_unmap_unlock(orig_pte, ptl);
   444		cond_resched();
   445	
   446		return 0;
   447	}
   448	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28091 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-25  7:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25  7:03 [mmotm:master 77/120] mm/madvise.c:332:7: error: implicit declaration of function 'is_huge_zero_pmd'; did you mean 'is_huge_zero_pud'? kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).