[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202209160507.aduyM31b-lkp@intel.com>
Date: Fri, 16 Sep 2022 06:16:06 +0800
From: kernel test robot <lkp@...el.com>
To: Xin Hao <xhao@...ux.alibaba.com>, sj@...nel.org
Cc: kbuild-all@...ts.01.org, akpm@...ux-foundation.org,
damon@...ts.linux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, xhao@...ux.alibaba.com
Subject: Re: [PATCH V1 2/2] mm/damon/core: remove duplicate check about THP
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: mips-randconfig-r003-20220915
compiler: mips64-linux-gcc (GCC) 12.1.0
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=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash mm/damon/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
mm/damon/vaddr.c: In function 'damon_young_pmd_entry':
>> mm/damon/vaddr.c:451:21: error: implicit declaration of function 'pmd_young'; did you mean 'pte_young'? [-Werror=implicit-function-declaration]
451 | if (pmd_young(*pmd) || !page_is_idle(page) ||
| ^~~~~~~~~
| pte_young
cc1: some warnings being treated as errors
vim +451 mm/damon/vaddr.c
3f49584b262cf8 SeongJae Park 2021-09-07 428
3f49584b262cf8 SeongJae Park 2021-09-07 429 static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr,
3f49584b262cf8 SeongJae Park 2021-09-07 430 unsigned long next, struct mm_walk *walk)
3f49584b262cf8 SeongJae Park 2021-09-07 431 {
3f49584b262cf8 SeongJae Park 2021-09-07 432 pte_t *pte;
3f49584b262cf8 SeongJae Park 2021-09-07 433 spinlock_t *ptl;
3f49584b262cf8 SeongJae Park 2021-09-07 434 struct page *page;
3f49584b262cf8 SeongJae Park 2021-09-07 435 struct damon_young_walk_private *priv = walk->private;
3f49584b262cf8 SeongJae Park 2021-09-07 436
72c33ef4c02e32 Baolin Wang 2022-08-18 437 if (pmd_trans_huge(*pmd)) {
3f49584b262cf8 SeongJae Park 2021-09-07 438 ptl = pmd_lock(walk->mm, pmd);
c8b9aff419303e Baolin Wang 2022-08-18 439 if (!pmd_present(*pmd)) {
c8b9aff419303e Baolin Wang 2022-08-18 440 spin_unlock(ptl);
c8b9aff419303e Baolin Wang 2022-08-18 441 return 0;
c8b9aff419303e Baolin Wang 2022-08-18 442 }
c8b9aff419303e Baolin Wang 2022-08-18 443
72c33ef4c02e32 Baolin Wang 2022-08-18 444 if (!pmd_trans_huge(*pmd)) {
3f49584b262cf8 SeongJae Park 2021-09-07 445 spin_unlock(ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 446 goto regular_page;
3f49584b262cf8 SeongJae Park 2021-09-07 447 }
3f49584b262cf8 SeongJae Park 2021-09-07 448 page = damon_get_page(pmd_pfn(*pmd));
3f49584b262cf8 SeongJae Park 2021-09-07 449 if (!page)
3f49584b262cf8 SeongJae Park 2021-09-07 450 goto huge_out;
3f49584b262cf8 SeongJae Park 2021-09-07 @451 if (pmd_young(*pmd) || !page_is_idle(page) ||
3f49584b262cf8 SeongJae Park 2021-09-07 452 mmu_notifier_test_young(walk->mm,
3f49584b262cf8 SeongJae Park 2021-09-07 453 addr)) {
02e34fff195d3a Kefeng Wang 2022-05-17 454 *priv->page_sz = HPAGE_PMD_SIZE;
3f49584b262cf8 SeongJae Park 2021-09-07 455 priv->young = true;
3f49584b262cf8 SeongJae Park 2021-09-07 456 }
3f49584b262cf8 SeongJae Park 2021-09-07 457 put_page(page);
3f49584b262cf8 SeongJae Park 2021-09-07 458 huge_out:
3f49584b262cf8 SeongJae Park 2021-09-07 459 spin_unlock(ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 460 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 461 }
3f49584b262cf8 SeongJae Park 2021-09-07 462
3f49584b262cf8 SeongJae Park 2021-09-07 463 regular_page:
3f49584b262cf8 SeongJae Park 2021-09-07 464
3f49584b262cf8 SeongJae Park 2021-09-07 465 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
3f49584b262cf8 SeongJae Park 2021-09-07 466 return -EINVAL;
3f49584b262cf8 SeongJae Park 2021-09-07 467 pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 468 if (!pte_present(*pte))
3f49584b262cf8 SeongJae Park 2021-09-07 469 goto out;
3f49584b262cf8 SeongJae Park 2021-09-07 470 page = damon_get_page(pte_pfn(*pte));
3f49584b262cf8 SeongJae Park 2021-09-07 471 if (!page)
3f49584b262cf8 SeongJae Park 2021-09-07 472 goto out;
3f49584b262cf8 SeongJae Park 2021-09-07 473 if (pte_young(*pte) || !page_is_idle(page) ||
3f49584b262cf8 SeongJae Park 2021-09-07 474 mmu_notifier_test_young(walk->mm, addr)) {
3f49584b262cf8 SeongJae Park 2021-09-07 475 *priv->page_sz = PAGE_SIZE;
3f49584b262cf8 SeongJae Park 2021-09-07 476 priv->young = true;
3f49584b262cf8 SeongJae Park 2021-09-07 477 }
3f49584b262cf8 SeongJae Park 2021-09-07 478 put_page(page);
3f49584b262cf8 SeongJae Park 2021-09-07 479 out:
3f49584b262cf8 SeongJae Park 2021-09-07 480 pte_unmap_unlock(pte, ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 481 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 482 }
3f49584b262cf8 SeongJae Park 2021-09-07 483
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (107620 bytes)
Powered by blists - more mailing lists