linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xin Hao <xhao@linux.alibaba.com>, sj@kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	xhao@linux.alibaba.com
Subject: Re: [PATCH V1 2/2] mm/damon/core: remove duplicate check about THP
Date: Fri, 16 Sep 2022 05:54:56 +0800	[thread overview]
Message-ID: <202209160528.6z2rUbjZ-lkp@intel.com> (raw)
In-Reply-To: <20220915142237.92529-2-xhao@linux.alibaba.com>

Hi Xin,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Xin-Hao/mm-damon-sysfs-avoid-call-damon_target_has_pid-repeatedly/20220915-230635
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
config: hexagon-randconfig-r002-20220915 (https://download.01.org/0day-ci/archive/20220916/202209160528.6z2rUbjZ-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/7902790b04d0eb74686b55218e8ead191ba5c003
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Xin-Hao/mm-damon-sysfs-avoid-call-damon_target_has_pid-repeatedly/20220915-230635
        git checkout 7902790b04d0eb74686b55218e8ead191ba5c003
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash mm/damon/

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

All errors (new ones prefixed by >>):

>> mm/damon/vaddr.c:451:7: error: call to undeclared function 'pmd_young'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   if (pmd_young(*pmd) || !page_is_idle(page) ||
                       ^
   mm/damon/vaddr.c:451:7: note: did you mean 'pte_young'?
   arch/hexagon/include/asm/pgtable.h:273:19: note: 'pte_young' declared here
   static inline int pte_young(pte_t pte)
                     ^
   1 error generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for PROC_CHILDREN
   Depends on [n]: PROC_FS [=n]
   Selected by [y]:
   - CHECKPOINT_RESTORE [=y]


vim +/pmd_young +451 mm/damon/vaddr.c

3f49584b262cf8f SeongJae Park 2021-09-07  428  
3f49584b262cf8f SeongJae Park 2021-09-07  429  static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr,
3f49584b262cf8f SeongJae Park 2021-09-07  430  		unsigned long next, struct mm_walk *walk)
3f49584b262cf8f SeongJae Park 2021-09-07  431  {
3f49584b262cf8f SeongJae Park 2021-09-07  432  	pte_t *pte;
3f49584b262cf8f SeongJae Park 2021-09-07  433  	spinlock_t *ptl;
3f49584b262cf8f SeongJae Park 2021-09-07  434  	struct page *page;
3f49584b262cf8f SeongJae Park 2021-09-07  435  	struct damon_young_walk_private *priv = walk->private;
3f49584b262cf8f SeongJae Park 2021-09-07  436  
72c33ef4c02e32e Baolin Wang   2022-08-18  437  	if (pmd_trans_huge(*pmd)) {
3f49584b262cf8f SeongJae Park 2021-09-07  438  		ptl = pmd_lock(walk->mm, pmd);
c8b9aff419303e4 Baolin Wang   2022-08-18  439  		if (!pmd_present(*pmd)) {
c8b9aff419303e4 Baolin Wang   2022-08-18  440  			spin_unlock(ptl);
c8b9aff419303e4 Baolin Wang   2022-08-18  441  			return 0;
c8b9aff419303e4 Baolin Wang   2022-08-18  442  		}
c8b9aff419303e4 Baolin Wang   2022-08-18  443  
72c33ef4c02e32e Baolin Wang   2022-08-18  444  		if (!pmd_trans_huge(*pmd)) {
3f49584b262cf8f SeongJae Park 2021-09-07  445  			spin_unlock(ptl);
3f49584b262cf8f SeongJae Park 2021-09-07  446  			goto regular_page;
3f49584b262cf8f SeongJae Park 2021-09-07  447  		}
3f49584b262cf8f SeongJae Park 2021-09-07  448  		page = damon_get_page(pmd_pfn(*pmd));
3f49584b262cf8f SeongJae Park 2021-09-07  449  		if (!page)
3f49584b262cf8f SeongJae Park 2021-09-07  450  			goto huge_out;
3f49584b262cf8f SeongJae Park 2021-09-07 @451  		if (pmd_young(*pmd) || !page_is_idle(page) ||
3f49584b262cf8f SeongJae Park 2021-09-07  452  					mmu_notifier_test_young(walk->mm,
3f49584b262cf8f SeongJae Park 2021-09-07  453  						addr)) {
02e34fff195d3a5 Kefeng Wang   2022-05-17  454  			*priv->page_sz = HPAGE_PMD_SIZE;
3f49584b262cf8f SeongJae Park 2021-09-07  455  			priv->young = true;
3f49584b262cf8f SeongJae Park 2021-09-07  456  		}
3f49584b262cf8f SeongJae Park 2021-09-07  457  		put_page(page);
3f49584b262cf8f SeongJae Park 2021-09-07  458  huge_out:
3f49584b262cf8f SeongJae Park 2021-09-07  459  		spin_unlock(ptl);
3f49584b262cf8f SeongJae Park 2021-09-07  460  		return 0;
3f49584b262cf8f SeongJae Park 2021-09-07  461  	}
3f49584b262cf8f SeongJae Park 2021-09-07  462  
3f49584b262cf8f SeongJae Park 2021-09-07  463  regular_page:
3f49584b262cf8f SeongJae Park 2021-09-07  464  
3f49584b262cf8f SeongJae Park 2021-09-07  465  	if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
3f49584b262cf8f SeongJae Park 2021-09-07  466  		return -EINVAL;
3f49584b262cf8f SeongJae Park 2021-09-07  467  	pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
3f49584b262cf8f SeongJae Park 2021-09-07  468  	if (!pte_present(*pte))
3f49584b262cf8f SeongJae Park 2021-09-07  469  		goto out;
3f49584b262cf8f SeongJae Park 2021-09-07  470  	page = damon_get_page(pte_pfn(*pte));
3f49584b262cf8f SeongJae Park 2021-09-07  471  	if (!page)
3f49584b262cf8f SeongJae Park 2021-09-07  472  		goto out;
3f49584b262cf8f SeongJae Park 2021-09-07  473  	if (pte_young(*pte) || !page_is_idle(page) ||
3f49584b262cf8f SeongJae Park 2021-09-07  474  			mmu_notifier_test_young(walk->mm, addr)) {
3f49584b262cf8f SeongJae Park 2021-09-07  475  		*priv->page_sz = PAGE_SIZE;
3f49584b262cf8f SeongJae Park 2021-09-07  476  		priv->young = true;
3f49584b262cf8f SeongJae Park 2021-09-07  477  	}
3f49584b262cf8f SeongJae Park 2021-09-07  478  	put_page(page);
3f49584b262cf8f SeongJae Park 2021-09-07  479  out:
3f49584b262cf8f SeongJae Park 2021-09-07  480  	pte_unmap_unlock(pte, ptl);
3f49584b262cf8f SeongJae Park 2021-09-07  481  	return 0;
3f49584b262cf8f SeongJae Park 2021-09-07  482  }
3f49584b262cf8f SeongJae Park 2021-09-07  483  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


  reply	other threads:[~2022-09-15 21:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15 14:22 [PATCH V1 1/2] mm/damon/sysfs: avoid call damon_target_has_pid() repeatedly Xin Hao
2022-09-15 14:22 ` [PATCH V1 2/2] mm/damon/core: remove duplicate check about THP Xin Hao
2022-09-15 21:54   ` kernel test robot [this message]
2022-09-15 22:26     ` Andrew Morton
2022-09-16  1:37       ` haoxin
2022-09-15 22:16   ` kernel test robot
2022-09-16  8:42 ` [PATCH V1 1/2] mm/damon/sysfs: avoid call damon_target_has_pid() repeatedly SeongJae Park
2022-09-16  8:57   ` haoxin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202209160528.6z2rUbjZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=sj@kernel.org \
    --cc=xhao@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox