From: kernel test robot <lkp@intel.com>
To: Yu Zhao <yuzhao@google.com>, linux-mm@kvack.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
Alex Shi <alex.shi@linux.alibaba.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Hillf Danton <hdanton@sina.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Matthew Wilcox <willy@infradead.org>,
Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH v1 13/14] mm: multigenerational lru: Kconfig
Date: Sat, 13 Mar 2021 21:36:20 +0800 [thread overview]
Message-ID: <202103132128.hIMOuqMu-lkp@intel.com> (raw)
In-Reply-To: <20210313075747.3781593-14-yuzhao@google.com>
[-- Attachment #1: Type: text/plain, Size: 12927 bytes --]
Hi Yu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/x86/core]
[also build test ERROR on tip/x86/mm tip/sched/core linus/master v5.12-rc2]
[cannot apply to cgroup/for-next tip/perf/core hnaz-linux-mm/master next-20210312]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yu-Zhao/Multigenerational-LRU/20210313-160036
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git d0962f2b24c99889a386f0658c71535f56358f77
config: mips-randconfig-r036-20210313 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dfd27ebbd0eb137c9a439b7c537bb87ba903efd3)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/7a8b80d7f0d02852d49395fc6e035743816f6b1d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yu-Zhao/Multigenerational-LRU/20210313-160036
git checkout 7a8b80d7f0d02852d49395fc6e035743816f6b1d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> mm/vmscan.c:4776:56: error: implicit declaration of function 'pmd_young' [-Werror,-Wimplicit-function-declaration]
if (IS_ENABLED(CONFIG_HAVE_ARCH_PARENT_PMD_YOUNG) && !pmd_young(pmd))
^
mm/vmscan.c:4776:56: note: did you mean 'pte_young'?
arch/mips/include/asm/pgtable.h:365:19: note: 'pte_young' declared here
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
^
>> mm/vmscan.c:4851:23: error: implicit declaration of function 'pmd_pfn' [-Werror,-Wimplicit-function-declaration]
unsigned long pfn = pmd_pfn(*pmd);
^
mm/vmscan.c:4851:23: note: did you mean 'pmd_off'?
include/linux/pgtable.h:131:22: note: 'pmd_off' declared here
static inline pmd_t *pmd_off(struct mm_struct *mm, unsigned long va)
^
mm/vmscan.c:4853:30: error: implicit declaration of function 'pmd_young' [-Werror,-Wimplicit-function-declaration]
if (!pmd_present(*pmd) || !pmd_young(*pmd) || is_huge_zero_pmd(*pmd))
^
>> mm/vmscan.c:4882:7: error: implicit declaration of function 'pmd_dirty' [-Werror,-Wimplicit-function-declaration]
if (pmd_dirty(*pmd) && !PageDirty(page) &&
^
mm/vmscan.c:4882:7: note: did you mean 'pte_dirty'?
arch/mips/include/asm/pgtable.h:364:19: note: 'pte_dirty' declared here
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; }
^
4 errors generated.
vim +/pmd_young +4776 mm/vmscan.c
4c59e20072808a Yu Zhao 2021-03-13 4759
4c59e20072808a Yu Zhao 2021-03-13 4760 static int walk_pte_range(pmd_t *pmdp, unsigned long start, unsigned long end,
4c59e20072808a Yu Zhao 2021-03-13 4761 struct mm_walk *walk)
4c59e20072808a Yu Zhao 2021-03-13 4762 {
4c59e20072808a Yu Zhao 2021-03-13 4763 pmd_t pmd;
4c59e20072808a Yu Zhao 2021-03-13 4764 pte_t *pte;
4c59e20072808a Yu Zhao 2021-03-13 4765 spinlock_t *ptl;
4c59e20072808a Yu Zhao 2021-03-13 4766 struct mm_walk_args *args = walk->private;
4c59e20072808a Yu Zhao 2021-03-13 4767 int old_gen, new_gen = lru_gen_from_seq(args->max_seq);
4c59e20072808a Yu Zhao 2021-03-13 4768
4c59e20072808a Yu Zhao 2021-03-13 4769 pmd = pmd_read_atomic(pmdp);
4c59e20072808a Yu Zhao 2021-03-13 4770 barrier();
4c59e20072808a Yu Zhao 2021-03-13 4771 if (!pmd_present(pmd) || pmd_trans_huge(pmd))
4c59e20072808a Yu Zhao 2021-03-13 4772 return 0;
4c59e20072808a Yu Zhao 2021-03-13 4773
4c59e20072808a Yu Zhao 2021-03-13 4774 VM_BUG_ON(pmd_huge(pmd) || pmd_devmap(pmd) || is_hugepd(__hugepd(pmd_val(pmd))));
4c59e20072808a Yu Zhao 2021-03-13 4775
4c59e20072808a Yu Zhao 2021-03-13 @4776 if (IS_ENABLED(CONFIG_HAVE_ARCH_PARENT_PMD_YOUNG) && !pmd_young(pmd))
4c59e20072808a Yu Zhao 2021-03-13 4777 return 0;
4c59e20072808a Yu Zhao 2021-03-13 4778
4c59e20072808a Yu Zhao 2021-03-13 4779 pte = pte_offset_map_lock(walk->mm, &pmd, start, &ptl);
4c59e20072808a Yu Zhao 2021-03-13 4780 arch_enter_lazy_mmu_mode();
4c59e20072808a Yu Zhao 2021-03-13 4781
4c59e20072808a Yu Zhao 2021-03-13 4782 for (; start != end; pte++, start += PAGE_SIZE) {
4c59e20072808a Yu Zhao 2021-03-13 4783 struct page *page;
4c59e20072808a Yu Zhao 2021-03-13 4784 unsigned long pfn = pte_pfn(*pte);
4c59e20072808a Yu Zhao 2021-03-13 4785
4c59e20072808a Yu Zhao 2021-03-13 4786 if (!pte_present(*pte) || !pte_young(*pte) || is_zero_pfn(pfn))
4c59e20072808a Yu Zhao 2021-03-13 4787 continue;
4c59e20072808a Yu Zhao 2021-03-13 4788
4c59e20072808a Yu Zhao 2021-03-13 4789 /*
4c59e20072808a Yu Zhao 2021-03-13 4790 * If this pte maps a page from a different node, set the
4c59e20072808a Yu Zhao 2021-03-13 4791 * bitmap to prevent the accessed bit on its parent pmd from
4c59e20072808a Yu Zhao 2021-03-13 4792 * being cleared.
4c59e20072808a Yu Zhao 2021-03-13 4793 */
4c59e20072808a Yu Zhao 2021-03-13 4794 if (pfn < args->start_pfn || pfn >= args->end_pfn) {
4c59e20072808a Yu Zhao 2021-03-13 4795 args->addr_bitmap |= get_addr_mask(start);
4c59e20072808a Yu Zhao 2021-03-13 4796 continue;
4c59e20072808a Yu Zhao 2021-03-13 4797 }
4c59e20072808a Yu Zhao 2021-03-13 4798
4c59e20072808a Yu Zhao 2021-03-13 4799 page = compound_head(pte_page(*pte));
4c59e20072808a Yu Zhao 2021-03-13 4800 if (page_to_nid(page) != args->node_id) {
4c59e20072808a Yu Zhao 2021-03-13 4801 args->addr_bitmap |= get_addr_mask(start);
4c59e20072808a Yu Zhao 2021-03-13 4802 continue;
4c59e20072808a Yu Zhao 2021-03-13 4803 }
4c59e20072808a Yu Zhao 2021-03-13 4804 if (page_memcg_rcu(page) != args->memcg)
4c59e20072808a Yu Zhao 2021-03-13 4805 continue;
4c59e20072808a Yu Zhao 2021-03-13 4806
4c59e20072808a Yu Zhao 2021-03-13 4807 if (ptep_test_and_clear_young(walk->vma, start, pte)) {
4c59e20072808a Yu Zhao 2021-03-13 4808 old_gen = page_update_lru_gen(page, new_gen);
4c59e20072808a Yu Zhao 2021-03-13 4809 if (old_gen >= 0 && old_gen != new_gen) {
4c59e20072808a Yu Zhao 2021-03-13 4810 update_batch_size(page, old_gen, new_gen);
4c59e20072808a Yu Zhao 2021-03-13 4811 args->batch_size++;
4c59e20072808a Yu Zhao 2021-03-13 4812 }
4c59e20072808a Yu Zhao 2021-03-13 4813 }
4c59e20072808a Yu Zhao 2021-03-13 4814
4c59e20072808a Yu Zhao 2021-03-13 4815 if (pte_dirty(*pte) && !PageDirty(page) &&
4c59e20072808a Yu Zhao 2021-03-13 4816 !(PageAnon(page) && PageSwapBacked(page) && !PageSwapCache(page)))
4c59e20072808a Yu Zhao 2021-03-13 4817 set_page_dirty(page);
4c59e20072808a Yu Zhao 2021-03-13 4818 }
4c59e20072808a Yu Zhao 2021-03-13 4819
4c59e20072808a Yu Zhao 2021-03-13 4820 arch_leave_lazy_mmu_mode();
4c59e20072808a Yu Zhao 2021-03-13 4821 pte_unmap_unlock(pte, ptl);
4c59e20072808a Yu Zhao 2021-03-13 4822
4c59e20072808a Yu Zhao 2021-03-13 4823 return 0;
4c59e20072808a Yu Zhao 2021-03-13 4824 }
4c59e20072808a Yu Zhao 2021-03-13 4825
4c59e20072808a Yu Zhao 2021-03-13 4826 static int walk_pmd_range(pud_t *pudp, unsigned long start, unsigned long end,
4c59e20072808a Yu Zhao 2021-03-13 4827 struct mm_walk *walk)
4c59e20072808a Yu Zhao 2021-03-13 4828 {
4c59e20072808a Yu Zhao 2021-03-13 4829 pud_t pud;
4c59e20072808a Yu Zhao 2021-03-13 4830 pmd_t *pmd;
4c59e20072808a Yu Zhao 2021-03-13 4831 spinlock_t *ptl;
4c59e20072808a Yu Zhao 2021-03-13 4832 struct mm_walk_args *args = walk->private;
4c59e20072808a Yu Zhao 2021-03-13 4833 int old_gen, new_gen = lru_gen_from_seq(args->max_seq);
4c59e20072808a Yu Zhao 2021-03-13 4834
4c59e20072808a Yu Zhao 2021-03-13 4835 pud = READ_ONCE(*pudp);
4c59e20072808a Yu Zhao 2021-03-13 4836 if (!pud_present(pud) || WARN_ON_ONCE(pud_trans_huge(pud)))
4c59e20072808a Yu Zhao 2021-03-13 4837 return 0;
4c59e20072808a Yu Zhao 2021-03-13 4838
4c59e20072808a Yu Zhao 2021-03-13 4839 VM_BUG_ON(pud_huge(pud) || pud_devmap(pud) || is_hugepd(__hugepd(pud_val(pud))));
4c59e20072808a Yu Zhao 2021-03-13 4840
4c59e20072808a Yu Zhao 2021-03-13 4841 if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) &&
4c59e20072808a Yu Zhao 2021-03-13 4842 !IS_ENABLED(CONFIG_HAVE_ARCH_PARENT_PMD_YOUNG))
4c59e20072808a Yu Zhao 2021-03-13 4843 goto done;
4c59e20072808a Yu Zhao 2021-03-13 4844
4c59e20072808a Yu Zhao 2021-03-13 4845 pmd = pmd_offset(&pud, start);
4c59e20072808a Yu Zhao 2021-03-13 4846 ptl = pmd_lock(walk->mm, pmd);
4c59e20072808a Yu Zhao 2021-03-13 4847 arch_enter_lazy_mmu_mode();
4c59e20072808a Yu Zhao 2021-03-13 4848
4c59e20072808a Yu Zhao 2021-03-13 4849 for (; start != end; pmd++, start = pmd_addr_end(start, end)) {
4c59e20072808a Yu Zhao 2021-03-13 4850 struct page *page;
4c59e20072808a Yu Zhao 2021-03-13 @4851 unsigned long pfn = pmd_pfn(*pmd);
4c59e20072808a Yu Zhao 2021-03-13 4852
4c59e20072808a Yu Zhao 2021-03-13 4853 if (!pmd_present(*pmd) || !pmd_young(*pmd) || is_huge_zero_pmd(*pmd))
4c59e20072808a Yu Zhao 2021-03-13 4854 continue;
4c59e20072808a Yu Zhao 2021-03-13 4855
4c59e20072808a Yu Zhao 2021-03-13 4856 if (!pmd_trans_huge(*pmd)) {
4c59e20072808a Yu Zhao 2021-03-13 4857 if (!(args->addr_bitmap & get_addr_mask(start)) &&
4c59e20072808a Yu Zhao 2021-03-13 4858 (!(pmd_addr_end(start, end) & ~PMD_MASK) ||
4c59e20072808a Yu Zhao 2021-03-13 4859 !walk->vma->vm_next ||
4c59e20072808a Yu Zhao 2021-03-13 4860 (walk->vma->vm_next->vm_start & PMD_MASK) > end))
4c59e20072808a Yu Zhao 2021-03-13 4861 pmdp_test_and_clear_young(walk->vma, start, pmd);
4c59e20072808a Yu Zhao 2021-03-13 4862 continue;
4c59e20072808a Yu Zhao 2021-03-13 4863 }
4c59e20072808a Yu Zhao 2021-03-13 4864
4c59e20072808a Yu Zhao 2021-03-13 4865 if (pfn < args->start_pfn || pfn >= args->end_pfn)
4c59e20072808a Yu Zhao 2021-03-13 4866 continue;
4c59e20072808a Yu Zhao 2021-03-13 4867
4c59e20072808a Yu Zhao 2021-03-13 4868 page = pmd_page(*pmd);
4c59e20072808a Yu Zhao 2021-03-13 4869 if (page_to_nid(page) != args->node_id)
4c59e20072808a Yu Zhao 2021-03-13 4870 continue;
4c59e20072808a Yu Zhao 2021-03-13 4871 if (page_memcg_rcu(page) != args->memcg)
4c59e20072808a Yu Zhao 2021-03-13 4872 continue;
4c59e20072808a Yu Zhao 2021-03-13 4873
4c59e20072808a Yu Zhao 2021-03-13 4874 if (pmdp_test_and_clear_young(walk->vma, start, pmd)) {
4c59e20072808a Yu Zhao 2021-03-13 4875 old_gen = page_update_lru_gen(page, new_gen);
4c59e20072808a Yu Zhao 2021-03-13 4876 if (old_gen >= 0 && old_gen != new_gen) {
4c59e20072808a Yu Zhao 2021-03-13 4877 update_batch_size(page, old_gen, new_gen);
4c59e20072808a Yu Zhao 2021-03-13 4878 args->batch_size++;
4c59e20072808a Yu Zhao 2021-03-13 4879 }
4c59e20072808a Yu Zhao 2021-03-13 4880 }
4c59e20072808a Yu Zhao 2021-03-13 4881
4c59e20072808a Yu Zhao 2021-03-13 @4882 if (pmd_dirty(*pmd) && !PageDirty(page) &&
4c59e20072808a Yu Zhao 2021-03-13 4883 !(PageAnon(page) && PageSwapBacked(page) && !PageSwapCache(page)))
4c59e20072808a Yu Zhao 2021-03-13 4884 set_page_dirty(page);
4c59e20072808a Yu Zhao 2021-03-13 4885 }
4c59e20072808a Yu Zhao 2021-03-13 4886
4c59e20072808a Yu Zhao 2021-03-13 4887 arch_leave_lazy_mmu_mode();
4c59e20072808a Yu Zhao 2021-03-13 4888 spin_unlock(ptl);
4c59e20072808a Yu Zhao 2021-03-13 4889 done:
4c59e20072808a Yu Zhao 2021-03-13 4890 args->addr_bitmap = 0;
4c59e20072808a Yu Zhao 2021-03-13 4891
4c59e20072808a Yu Zhao 2021-03-13 4892 if (args->batch_size < MAX_BATCH_SIZE)
4c59e20072808a Yu Zhao 2021-03-13 4893 return 0;
4c59e20072808a Yu Zhao 2021-03-13 4894
4c59e20072808a Yu Zhao 2021-03-13 4895 args->next_addr = end;
4c59e20072808a Yu Zhao 2021-03-13 4896
4c59e20072808a Yu Zhao 2021-03-13 4897 return -EAGAIN;
4c59e20072808a Yu Zhao 2021-03-13 4898 }
4c59e20072808a Yu Zhao 2021-03-13 4899
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31615 bytes --]
next prev parent reply other threads:[~2021-03-13 16:03 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-13 7:57 [PATCH v1 00/14] Multigenerational LRU Yu Zhao
2021-03-13 7:57 ` [PATCH v1 01/14] include/linux/memcontrol.h: do not warn in page_memcg_rcu() if !CONFIG_MEMCG Yu Zhao
2021-03-13 15:09 ` Matthew Wilcox
2021-03-14 7:45 ` Yu Zhao
2021-03-13 7:57 ` [PATCH v1 02/14] include/linux/nodemask.h: define next_memory_node() if !CONFIG_NUMA Yu Zhao
2021-03-13 7:57 ` [PATCH v1 03/14] include/linux/huge_mm.h: define is_huge_zero_pmd() if !CONFIG_TRANSPARENT_HUGEPAGE Yu Zhao
2021-03-13 7:57 ` [PATCH v1 04/14] include/linux/cgroup.h: export cgroup_mutex Yu Zhao
2021-03-13 7:57 ` [PATCH v1 05/14] mm/swap.c: export activate_page() Yu Zhao
2021-03-13 7:57 ` [PATCH v1 06/14] mm, x86: support the access bit on non-leaf PMD entries Yu Zhao
2021-03-14 22:12 ` Zi Yan
2021-03-14 22:51 ` Matthew Wilcox
2021-03-15 0:03 ` Yu Zhao
2021-03-15 0:27 ` Zi Yan
2021-03-15 1:04 ` Yu Zhao
2021-03-14 23:22 ` Dave Hansen
2021-03-15 3:16 ` Yu Zhao
2021-03-13 7:57 ` [PATCH v1 07/14] mm/pagewalk.c: add pud_entry_post() for post-order traversals Yu Zhao
2021-03-13 7:57 ` [PATCH v1 08/14] mm/vmscan.c: refactor shrink_node() Yu Zhao
2021-03-13 7:57 ` [PATCH v1 09/14] mm: multigenerational lru: mm_struct list Yu Zhao
2021-03-15 19:40 ` Rik van Riel
2021-03-16 2:07 ` Huang, Ying
2021-03-16 3:57 ` Yu Zhao
2021-03-16 6:44 ` Huang, Ying
2021-03-16 7:56 ` Yu Zhao
2021-03-17 3:37 ` Huang, Ying
2021-03-17 10:46 ` Yu Zhao
2021-03-22 3:13 ` Huang, Ying
2021-03-22 8:08 ` Yu Zhao
2021-03-24 6:58 ` Huang, Ying
2021-04-10 18:48 ` Yu Zhao
2021-04-13 3:06 ` Huang, Ying
2021-03-13 7:57 ` [PATCH v1 10/14] mm: multigenerational lru: core Yu Zhao
2021-03-15 2:02 ` Andi Kleen
2021-03-15 3:37 ` Yu Zhao
2021-03-13 7:57 ` [PATCH v1 11/14] mm: multigenerational lru: page activation Yu Zhao
2021-03-16 16:34 ` Matthew Wilcox
2021-03-16 21:29 ` Yu Zhao
2021-03-13 7:57 ` [PATCH v1 12/14] mm: multigenerational lru: user space interface Yu Zhao
2021-03-13 12:23 ` kernel test robot
2021-03-13 7:57 ` [PATCH v1 13/14] mm: multigenerational lru: Kconfig Yu Zhao
2021-03-13 12:53 ` kernel test robot
2021-03-13 13:36 ` kernel test robot [this message]
2021-03-13 7:57 ` [PATCH v1 14/14] mm: multigenerational lru: documentation Yu Zhao
2021-03-19 9:31 ` Alex Shi
2021-03-22 6:09 ` Yu Zhao
2021-03-14 22:48 ` [PATCH v1 00/14] Multigenerational LRU Zi Yan
2021-03-15 0:52 ` Yu Zhao
2021-03-15 1:13 ` Hillf Danton
2021-03-15 6:49 ` Yu Zhao
2021-03-15 18:00 ` Dave Hansen
2021-03-16 2:24 ` Yu Zhao
2021-03-16 14:50 ` Dave Hansen
2021-03-16 20:30 ` Yu Zhao
2021-03-16 21:14 ` Dave Hansen
2021-04-10 9:21 ` Yu Zhao
2021-04-13 3:02 ` Huang, Ying
2021-04-13 23:00 ` Yu Zhao
2021-03-15 18:38 ` Yang Shi
2021-03-16 3:38 ` Yu Zhao
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=202103132128.hIMOuqMu-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@linux.alibaba.com \
--cc=clang-built-linux@googlegroups.com \
--cc=dave.hansen@linux.intel.com \
--cc=hannes@cmpxchg.org \
--cc=hdanton@sina.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=willy@infradead.org \
--cc=yuzhao@google.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;
as well as URLs for NNTP newsgroup(s).