From: kernel test robot <lkp@intel.com>
To: Chih-En Lin <shiyn.lin@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 4/6] mm: Add COW PTE fallback function
Date: Fri, 20 May 2022 08:20:31 +0800 [thread overview]
Message-ID: <202205200816.ZhOASVVs-lkp@intel.com> (raw)
In-Reply-To: <20220519183127.3909598-5-shiyn.lin@gmail.com>
Hi Chih-En,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on tip/sched/core]
[also build test ERROR on soc/for-next linus/master v5.18-rc7 next-20220519]
[cannot apply to akpm-mm/mm-everything]
[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/intel-lab-lkp/linux/commits/Chih-En-Lin/Introduce-Copy-On-Write-to-Page-Table/20220520-023243
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 734387ec2f9d77b00276042b1fa7c95f48ee879d
config: arm-shannon_defconfig (https://download.01.org/0day-ci/archive/20220520/202205200816.ZhOASVVs-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e00cbbec06c08dc616a0d52a20f678b8fbd4e304)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/intel-lab-lkp/linux/commit/e4e2e178c5a43b37925972bc0eab9976d41d35c7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Chih-En-Lin/Introduce-Copy-On-Write-to-Page-Table/20220520-023243
git checkout e4e2e178c5a43b37925972bc0eab9976d41d35c7
# 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=arm SHELL=/bin/bash
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/memory.c:1007:9: warning: variable 'orig_ptep' set but not used [-Wunused-but-set-variable]
pte_t *orig_ptep, *ptep;
^
>> mm/memory.c:4616:8: error: call to undeclared function 'pmd_mkwrite'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
new = pmd_mkwrite(*pmd);
^
>> mm/memory.c:4617:2: error: call to undeclared function 'set_pmd_at'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
set_pmd_at(mm, addr, pmd, new);
^
mm/memory.c:4617:2: note: did you mean 'set_pte_at'?
arch/arm/include/asm/pgtable.h:225:6: note: 'set_pte_at' declared here
void set_pte_at(struct mm_struct *mm, unsigned long addr,
^
mm/memory.c:4592:6: warning: no previous prototype for function 'cow_pte_fallback' [-Wmissing-prototypes]
void cow_pte_fallback(struct vm_area_struct *vma, pmd_t *pmd,
^
mm/memory.c:4592:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void cow_pte_fallback(struct vm_area_struct *vma, pmd_t *pmd,
^
static
2 warnings and 2 errors generated.
vim +/pmd_mkwrite +4616 mm/memory.c
4584
4585 /* COW PTE fallback to normal PTE:
4586 * - two state here
4587 * - After break child : [parent, rss=1, ref=1, write=NO , owner=parent]
4588 * to [parent, rss=1, ref=1, write=YES, owner=NULL ]
4589 * - After break parent: [child , rss=0, ref=1, write=NO , owner=NULL ]
4590 * to [child , rss=1, ref=1, write=YES, owner=NULL ]
4591 */
4592 void cow_pte_fallback(struct vm_area_struct *vma, pmd_t *pmd,
4593 unsigned long addr)
4594 {
4595 struct mm_struct *mm = vma->vm_mm;
4596 unsigned long start, end;
4597 pmd_t new;
4598
4599 BUG_ON(pmd_write(*pmd));
4600
4601 start = addr & PMD_MASK;
4602 end = (addr + PMD_SIZE) & PMD_MASK;
4603
4604 /* If pmd is not owner, it needs to increase the rss.
4605 * Since only the owner has the RSS state for the COW PTE.
4606 */
4607 if (!cow_pte_owner_is_same(pmd, pmd)) {
4608 cow_pte_rss(mm, vma, pmd, start, end, true /* inc */);
4609 mm_inc_nr_ptes(mm);
4610 smp_wmb();
4611 pmd_populate(mm, pmd, pmd_page(*pmd));
4612 }
4613
4614 /* Reuse the pte page */
4615 set_cow_pte_owner(pmd, NULL);
> 4616 new = pmd_mkwrite(*pmd);
> 4617 set_pmd_at(mm, addr, pmd, new);
4618
4619 BUG_ON(!pmd_write(*pmd));
4620 BUG_ON(pmd_page(*pmd)->cow_pte_owner);
4621 }
4622
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-05-20 0:20 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 18:31 [RFC PATCH 0/6] Introduce Copy-On-Write to Page Table Chih-En Lin
2022-05-19 18:31 ` [RFC PATCH 1/6] mm: Add a new mm flag for Copy-On-Write PTE table Chih-En Lin
2022-05-19 18:31 ` [RFC PATCH 2/6] mm: clone3: Add CLONE_COW_PGTABLE flag Chih-En Lin
2022-05-20 14:13 ` Christophe Leroy
2022-05-21 3:50 ` Chih-En Lin
2022-05-19 18:31 ` [RFC PATCH 3/6] mm, pgtable: Add ownership for the PTE table Chih-En Lin
2022-05-19 23:07 ` kernel test robot
2022-05-20 0:08 ` kernel test robot
2022-05-20 14:15 ` Christophe Leroy
2022-05-21 4:03 ` Chih-En Lin
2022-05-21 4:02 ` Matthew Wilcox
2022-05-21 5:01 ` Chih-En Lin
2022-05-19 18:31 ` [RFC PATCH 4/6] mm: Add COW PTE fallback function Chih-En Lin
2022-05-20 0:20 ` kernel test robot [this message]
2022-05-20 14:21 ` Christophe Leroy
2022-05-21 4:15 ` Chih-En Lin
2022-05-19 18:31 ` [RFC PATCH 5/6] mm, pgtable: Add the reference counter for COW PTE Chih-En Lin
2022-05-20 14:30 ` Christophe Leroy
2022-05-21 4:22 ` Chih-En Lin
2022-05-21 4:08 ` Matthew Wilcox
2022-05-21 5:10 ` Chih-En Lin
2022-05-19 18:31 ` [RFC PATCH 6/6] mm: Expand Copy-On-Write to PTE table Chih-En Lin
2022-05-20 14:49 ` Christophe Leroy
2022-05-21 4:38 ` Chih-En Lin
2022-05-21 8:59 ` [External] [RFC PATCH 0/6] Introduce Copy-On-Write to Page Table Qi Zheng
2022-05-21 19:08 ` Chih-En Lin
2022-05-21 16:07 ` David Hildenbrand
2022-05-21 18:50 ` Chih-En Lin
2022-05-21 20:28 ` David Hildenbrand
2022-05-21 20:12 ` Matthew Wilcox
2022-05-21 20:22 ` David Hildenbrand
2022-05-21 22:19 ` Andy Lutomirski
2022-05-22 0:31 ` Matthew Wilcox
2022-05-22 15:20 ` Andy Lutomirski
2022-05-22 19:40 ` Matthew Wilcox
-- strict thread matches above, loose matches on Subject: below --
2022-05-20 10:16 [RFC PATCH 4/6] mm: Add COW PTE fallback function kernel test robot
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=202205200816.ZhOASVVs-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
--cc=shiyn.lin@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.