All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Axel Rasmussen <axelrasmussen@google.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Chinwen Chang <chinwen.chang@mediatek.com>,
	Huang Ying <ying.huang@intel.com>, Ingo Molnar <mingo@redhat.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH v4 01/10] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()
Date: Fri, 5 Feb 2021 09:04:36 +0800	[thread overview]
Message-ID: <202102050904.dfVVRntI-lkp@intel.com> (raw)
In-Reply-To: <20210204183433.1431202-2-axelrasmussen@google.com>

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

Hi Axel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on hp-parisc/for-next powerpc/next s390/features tip/perf/core kselftest/next linus/master v5.11-rc6 next-20210125]
[cannot apply to hnaz-linux-mm/master sparc-next/master sparc/master]
[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/Axel-Rasmussen/userfaultfd-add-minor-fault-handling/20210205-025326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: parisc-randconfig-r005-20210204 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/e93b01010bfd81b2cb9063131fecddfb6685fac1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Axel-Rasmussen/userfaultfd-add-minor-fault-handling/20210205-025326
        git checkout e93b01010bfd81b2cb9063131fecddfb6685fac1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

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/hugetlb.c:5376:8: error: conflicting types for 'huge_pmd_share'
    5376 | pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct vma,
         |        ^~~~~~~~~~~~~~
   In file included from mm/hugetlb.c:39:
   include/linux/hugetlb.h:155:8: note: previous declaration of 'huge_pmd_share' was here
     155 | pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct *vma,
         |        ^~~~~~~~~~~~~~


vim +/huge_pmd_share +5376 mm/hugetlb.c

  5343	
  5344	/*
  5345	 * unmap huge page backed by shared pte.
  5346	 *
  5347	 * Hugetlb pte page is ref counted at the time of mapping.  If pte is shared
  5348	 * indicated by page_count > 1, unmap is achieved by clearing pud and
  5349	 * decrementing the ref count. If count == 1, the pte page is not shared.
  5350	 *
  5351	 * Called with page table lock held and i_mmap_rwsem held in write mode.
  5352	 *
  5353	 * returns: 1 successfully unmapped a shared pte page
  5354	 *	    0 the underlying pte page is not shared, or it is the last user
  5355	 */
  5356	int huge_pmd_unshare(struct mm_struct *mm, struct vm_area_struct *vma,
  5357						unsigned long *addr, pte_t *ptep)
  5358	{
  5359		pgd_t *pgd = pgd_offset(mm, *addr);
  5360		p4d_t *p4d = p4d_offset(pgd, *addr);
  5361		pud_t *pud = pud_offset(p4d, *addr);
  5362	
  5363		i_mmap_assert_write_locked(vma->vm_file->f_mapping);
  5364		BUG_ON(page_count(virt_to_page(ptep)) == 0);
  5365		if (page_count(virt_to_page(ptep)) == 1)
  5366			return 0;
  5367	
  5368		pud_clear(pud);
  5369		put_page(virt_to_page(ptep));
  5370		mm_dec_nr_pmds(mm);
  5371		*addr = ALIGN(*addr, HPAGE_SIZE * PTRS_PER_PTE) - HPAGE_SIZE;
  5372		return 1;
  5373	}
  5374	#define want_pmd_share()	(1)
  5375	#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
> 5376	pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct vma,
  5377			      unsigned long addr, pud_t *pud)
  5378	{
  5379		return NULL;
  5380	}
  5381	

---
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: 32443 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4 01/10] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()
Date: Fri, 05 Feb 2021 09:04:36 +0800	[thread overview]
Message-ID: <202102050904.dfVVRntI-lkp@intel.com> (raw)
In-Reply-To: <20210204183433.1431202-2-axelrasmussen@google.com>

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

Hi Axel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on hp-parisc/for-next powerpc/next s390/features tip/perf/core kselftest/next linus/master v5.11-rc6 next-20210125]
[cannot apply to hnaz-linux-mm/master sparc-next/master sparc/master]
[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/Axel-Rasmussen/userfaultfd-add-minor-fault-handling/20210205-025326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: parisc-randconfig-r005-20210204 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/e93b01010bfd81b2cb9063131fecddfb6685fac1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Axel-Rasmussen/userfaultfd-add-minor-fault-handling/20210205-025326
        git checkout e93b01010bfd81b2cb9063131fecddfb6685fac1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

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/hugetlb.c:5376:8: error: conflicting types for 'huge_pmd_share'
    5376 | pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct vma,
         |        ^~~~~~~~~~~~~~
   In file included from mm/hugetlb.c:39:
   include/linux/hugetlb.h:155:8: note: previous declaration of 'huge_pmd_share' was here
     155 | pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct *vma,
         |        ^~~~~~~~~~~~~~


vim +/huge_pmd_share +5376 mm/hugetlb.c

  5343	
  5344	/*
  5345	 * unmap huge page backed by shared pte.
  5346	 *
  5347	 * Hugetlb pte page is ref counted at the time of mapping.  If pte is shared
  5348	 * indicated by page_count > 1, unmap is achieved by clearing pud and
  5349	 * decrementing the ref count. If count == 1, the pte page is not shared.
  5350	 *
  5351	 * Called with page table lock held and i_mmap_rwsem held in write mode.
  5352	 *
  5353	 * returns: 1 successfully unmapped a shared pte page
  5354	 *	    0 the underlying pte page is not shared, or it is the last user
  5355	 */
  5356	int huge_pmd_unshare(struct mm_struct *mm, struct vm_area_struct *vma,
  5357						unsigned long *addr, pte_t *ptep)
  5358	{
  5359		pgd_t *pgd = pgd_offset(mm, *addr);
  5360		p4d_t *p4d = p4d_offset(pgd, *addr);
  5361		pud_t *pud = pud_offset(p4d, *addr);
  5362	
  5363		i_mmap_assert_write_locked(vma->vm_file->f_mapping);
  5364		BUG_ON(page_count(virt_to_page(ptep)) == 0);
  5365		if (page_count(virt_to_page(ptep)) == 1)
  5366			return 0;
  5367	
  5368		pud_clear(pud);
  5369		put_page(virt_to_page(ptep));
  5370		mm_dec_nr_pmds(mm);
  5371		*addr = ALIGN(*addr, HPAGE_SIZE * PTRS_PER_PTE) - HPAGE_SIZE;
  5372		return 1;
  5373	}
  5374	#define want_pmd_share()	(1)
  5375	#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
> 5376	pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct vma,
  5377			      unsigned long addr, pud_t *pud)
  5378	{
  5379		return NULL;
  5380	}
  5381	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

  reply	other threads:[~2021-02-05  1:05 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 18:34 [PATCH v4 00/10] userfaultfd: add minor fault handling Axel Rasmussen
2021-02-04 18:34 ` Axel Rasmussen
2021-02-04 18:34 ` [PATCH v4 01/10] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share() Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-05  1:04   ` kernel test robot [this message]
2021-02-05  1:04     ` kernel test robot
2021-02-04 18:34 ` [PATCH v4 02/10] hugetlb/userfaultfd: Forbid huge pmd sharing when uffd enabled Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-04 18:34 ` [PATCH v4 03/10] mm/hugetlb: Move flush_hugetlb_tlb_range() into hugetlb.h Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-04 18:34 ` [PATCH v4 04/10] hugetlb/userfaultfd: Unshare all pmds for hugetlbfs when register wp Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-04 18:34 ` [PATCH v4 05/10] userfaultfd: add minor fault registration mode Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-09  0:00   ` Peter Xu
2021-02-04 18:34 ` [PATCH v4 06/10] userfaultfd: disable huge PMD sharing for MINOR registered VMAs Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-04 18:34 ` [PATCH v4 07/10] userfaultfd: hugetlbfs: only compile UFFD helpers if config enabled Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-04 18:34 ` [PATCH v4 08/10] userfaultfd: add UFFDIO_CONTINUE ioctl Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-08 23:54   ` Peter Xu
2021-02-10 18:00     ` Axel Rasmussen
2021-02-10 19:06       ` Peter Xu
2021-02-04 18:34 ` [PATCH v4 09/10] userfaultfd: update documentation to describe minor fault handling Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-04 19:57   ` Randy Dunlap
2021-02-04 21:04     ` Axel Rasmussen
2021-02-04 21:07       ` Randy Dunlap
2021-02-04 18:34 ` [PATCH v4 10/10] userfaultfd/selftests: add test exercising " Axel Rasmussen
2021-02-04 18:34   ` Axel Rasmussen
2021-02-04 18:38 ` [PATCH v4 00/10] userfaultfd: add " Axel Rasmussen
2021-02-04 18:38   ` Axel Rasmussen
2021-02-09  0:03 ` Peter Xu
2021-02-09  0:19   ` Axel Rasmussen

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=202102050904.dfVVRntI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aarcange@redhat.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=axelrasmussen@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=chinwen.chang@mediatek.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=ying.huang@intel.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.