linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qi Zheng <zhengqi.arch@bytedance.com>,
	akpm@linux-foundation.org, tglx@linutronix.de,
	kirill.shutemov@linux.intel.com, mika.penttila@nextfour.com,
	david@redhat.com, jgg@nvidia.com
Cc: kbuild-all@lists.01.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	songmuchun@bytedance.com
Subject: Re: [PATCH v3 06/15] mm: introduce refcount for user PTE page table page
Date: Thu, 11 Nov 2021 08:37:29 +0800	[thread overview]
Message-ID: <202111110851.zOTlo7RL-lkp@intel.com> (raw)
In-Reply-To: <20211110105428.32458-7-zhengqi.arch@bytedance.com>

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

Hi Qi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]
[also build test ERROR on linus/master next-20211110]
[cannot apply to tip/perf/core tip/x86/core v5.15]
[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/Qi-Zheng/Free-user-PTE-page-table-pages/20211110-185837
base:   https://github.com/hnaz/linux-mm master
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.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/e03404013f81d7b11aa6f5c3fef3816320b2baf0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Qi-Zheng/Free-user-PTE-page-table-pages/20211110-185837
        git checkout e03404013f81d7b11aa6f5c3fef3816320b2baf0
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips prepare

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 >>):

   error: no override and no default toolchain set
   init/Kconfig:70:warning: 'RUSTC_VERSION': number is invalid
   In file included from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/radix-tree.h:12,
                    from include/linux/fs.h:15,
                    from include/linux/compat.h:17,
                    from arch/mips/kernel/asm-offsets.c:12:
>> include/linux/mm_types.h:154:33: error: unknown type name 'pmd_t'
     154 |                                 pmd_t *pmd;             /* PTE page only */
         |                                 ^~~~~
   In file included from include/asm-generic/div64.h:27,
                    from arch/mips/include/asm/div64.h:89,
                    from include/linux/math.h:5,
                    from include/linux/math64.h:6,
                    from include/linux/time.h:6,
                    from include/linux/compat.h:10,
                    from arch/mips/kernel/asm-offsets.c:12:
   include/linux/mm.h: In function 'pte_alloc':
   include/linux/mm.h:2318:22: error: implicit declaration of function 'is_huge_pmd'; did you mean 'zap_huge_pmd'? [-Werror=implicit-function-declaration]
    2318 |         if (unlikely(is_huge_pmd(*pmd)))
         |                      ^~~~~~~~~~~
   include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
      78 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                                             ^
   arch/mips/kernel/asm-offsets.c: At top level:
   arch/mips/kernel/asm-offsets.c:26:6: error: no previous prototype for 'output_ptreg_defines' [-Werror=missing-prototypes]
      26 | void output_ptreg_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:78:6: error: no previous prototype for 'output_task_defines' [-Werror=missing-prototypes]
      78 | void output_task_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:92:6: error: no previous prototype for 'output_thread_info_defines' [-Werror=missing-prototypes]
      92 | void output_thread_info_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:108:6: error: no previous prototype for 'output_thread_defines' [-Werror=missing-prototypes]
     108 | void output_thread_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:136:6: error: no previous prototype for 'output_thread_fpu_defines' [-Werror=missing-prototypes]
     136 | void output_thread_fpu_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:179:6: error: no previous prototype for 'output_mm_defines' [-Werror=missing-prototypes]
     179 | void output_mm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:218:6: error: no previous prototype for 'output_sc_defines' [-Werror=missing-prototypes]
     218 | void output_sc_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:253:6: error: no previous prototype for 'output_signal_defined' [-Werror=missing-prototypes]
     253 | void output_signal_defined(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:320:6: error: no previous prototype for 'output_pbe_defines' [-Werror=missing-prototypes]
     320 | void output_pbe_defines(void)
         |      ^~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:332:6: error: no previous prototype for 'output_pm_defines' [-Werror=missing-prototypes]
     332 | void output_pm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:346:6: error: no previous prototype for 'output_kvm_defines' [-Werror=missing-prototypes]
     346 | void output_kvm_defines(void)
         |      ^~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:390:6: error: no previous prototype for 'output_cps_defines' [-Werror=missing-prototypes]
     390 | void output_cps_defines(void)
         |      ^~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:122: arch/mips/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1288: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:226: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/pmd_t +154 include/linux/mm_types.h

    70	
    71	struct page {
    72		unsigned long flags;		/* Atomic flags, some possibly
    73						 * updated asynchronously */
    74		/*
    75		 * Five words (20/40 bytes) are available in this union.
    76		 * WARNING: bit 0 of the first word is used for PageTail(). That
    77		 * means the other users of this union MUST NOT use the bit to
    78		 * avoid collision and false-positive PageTail().
    79		 */
    80		union {
    81			struct {	/* Page cache and anonymous pages */
    82				/**
    83				 * @lru: Pageout list, eg. active_list protected by
    84				 * lruvec->lru_lock.  Sometimes used as a generic list
    85				 * by the page owner.
    86				 */
    87				struct list_head lru;
    88				/* See page-flags.h for PAGE_MAPPING_FLAGS */
    89				struct address_space *mapping;
    90				pgoff_t index;		/* Our offset within mapping. */
    91				/**
    92				 * @private: Mapping-private opaque data.
    93				 * Usually used for buffer_heads if PagePrivate.
    94				 * Used for swp_entry_t if PageSwapCache.
    95				 * Indicates order in the buddy system if PageBuddy.
    96				 */
    97				unsigned long private;
    98			};
    99			struct {	/* page_pool used by netstack */
   100				/**
   101				 * @pp_magic: magic value to avoid recycling non
   102				 * page_pool allocated pages.
   103				 */
   104				unsigned long pp_magic;
   105				struct page_pool *pp;
   106				unsigned long _pp_mapping_pad;
   107				unsigned long dma_addr;
   108				atomic_long_t pp_frag_count;
   109			};
   110			struct {	/* slab, slob and slub */
   111				union {
   112					struct list_head slab_list;
   113					struct {	/* Partial pages */
   114						struct page *next;
   115	#ifdef CONFIG_64BIT
   116						int pages;	/* Nr of pages left */
   117	#else
   118						short int pages;
   119	#endif
   120					};
   121				};
   122				struct kmem_cache *slab_cache; /* not slob */
   123				/* Double-word boundary */
   124				void *freelist;		/* first free object */
   125				union {
   126					void *s_mem;	/* slab: first object */
   127					unsigned long counters;		/* SLUB */
   128					struct {			/* SLUB */
   129						unsigned inuse:16;
   130						unsigned objects:15;
   131						unsigned frozen:1;
   132					};
   133				};
   134			};
   135			struct {	/* Tail pages of compound page */
   136				unsigned long compound_head;	/* Bit zero is set */
   137	
   138				/* First tail page only */
   139				unsigned char compound_dtor;
   140				unsigned char compound_order;
   141				atomic_t compound_mapcount;
   142				unsigned int compound_nr; /* 1 << compound_order */
   143			};
   144			struct {	/* Second tail page of compound page */
   145				unsigned long _compound_pad_1;	/* compound_head */
   146				atomic_t hpage_pinned_refcount;
   147				/* For both global and memcg */
   148				struct list_head deferred_list;
   149			};
   150			struct {	/* Page table pages */
   151				unsigned long _pt_pad_1;	/* compound_head */
   152				union {
   153					pgtable_t pmd_huge_pte; /* protected by page->ptl */
 > 154					pmd_t *pmd;             /* PTE page only */
   155				};
   156				unsigned long _pt_pad_2;	/* mapping */
   157				union {
   158					struct mm_struct *pt_mm; /* x86 pgds only */
   159					atomic_t pt_frag_refcount; /* powerpc */
   160					atomic_t pte_refcount;  /* PTE page only */
   161				};
   162	#if ALLOC_SPLIT_PTLOCKS
   163				spinlock_t *ptl;
   164	#else
   165				spinlock_t ptl;
   166	#endif
   167			};
   168			struct {	/* ZONE_DEVICE pages */
   169				/** @pgmap: Points to the hosting device page map. */
   170				struct dev_pagemap *pgmap;
   171				void *zone_device_data;
   172				/*
   173				 * ZONE_DEVICE private pages are counted as being
   174				 * mapped so the next 3 words hold the mapping, index,
   175				 * and private fields from the source anonymous or
   176				 * page cache page while the page is migrated to device
   177				 * private memory.
   178				 * ZONE_DEVICE MEMORY_DEVICE_FS_DAX pages also
   179				 * use the mapping, index, and private fields when
   180				 * pmem backed DAX files are mapped.
   181				 */
   182			};
   183	
   184			/** @rcu_head: You can use this to free a page by RCU. */
   185			struct rcu_head rcu_head;
   186		};
   187	
   188		union {		/* This union is 4 bytes in size. */
   189			/*
   190			 * If the page can be mapped to userspace, encodes the number
   191			 * of times this page is referenced by a page table.
   192			 */
   193			atomic_t _mapcount;
   194	
   195			/*
   196			 * If the page is neither PageSlab nor mappable to userspace,
   197			 * the value stored here may help determine what this page
   198			 * is used for.  See page-flags.h for a list of page types
   199			 * which are currently stored here.
   200			 */
   201			unsigned int page_type;
   202	
   203			unsigned int active;		/* SLAB */
   204			int units;			/* SLOB */
   205		};
   206	
   207		/* Usage count. *DO NOT USE DIRECTLY*. See page_ref.h */
   208		atomic_t _refcount;
   209	

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

  reply	other threads:[~2021-11-11  0:38 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 10:54 [PATCH v3 00/15] Free user PTE page table pages Qi Zheng
2021-11-10 10:54 ` [PATCH v3 01/15] mm: do code cleanups to filemap_map_pmd() Qi Zheng
2021-11-10 10:54 ` [PATCH v3 02/15] mm: introduce is_huge_pmd() helper Qi Zheng
2021-11-11 13:46   ` kernel test robot
2021-11-10 10:54 ` [PATCH v3 03/15] mm: move pte_offset_map_lock() to pgtable.h Qi Zheng
2021-11-10 10:54 ` [PATCH v3 04/15] mm: rework the parameter of lock_page_or_retry() Qi Zheng
2021-11-10 10:54 ` [PATCH v3 05/15] mm: add pmd_installed_type return for __pte_alloc() and other friends Qi Zheng
2021-11-10 10:54 ` [PATCH v3 06/15] mm: introduce refcount for user PTE page table page Qi Zheng
2021-11-11  0:37   ` kernel test robot [this message]
2021-11-10 10:54 ` [PATCH v3 07/15] mm/pte_ref: add support for user PTE page table page allocation Qi Zheng
2021-11-11 15:17   ` kernel test robot
2021-11-10 10:54 ` [PATCH v3 08/15] mm/pte_ref: initialize the refcount of the withdrawn PTE page table page Qi Zheng
2021-11-10 10:54 ` [PATCH v3 09/15] mm/pte_ref: add support for the map/unmap of user " Qi Zheng
2021-11-10 10:54 ` [PATCH v3 10/15] mm/pte_ref: add support for page fault path Qi Zheng
2021-11-10 10:54 ` [PATCH v3 11/15] mm/pte_ref: take a refcount before accessing the PTE page table page Qi Zheng
2021-11-10 10:54 ` [PATCH v3 12/15] mm/pte_ref: update the pmd entry in move_normal_pmd() Qi Zheng
2021-11-10 10:54 ` [PATCH v3 13/15] mm/pte_ref: free user PTE page table pages Qi Zheng
2021-11-14 14:43   ` [mm/pte_ref] afcc9fb874: kernel_BUG_at_include/linux/pte_ref.h kernel test robot
2021-11-10 10:54 ` [PATCH v3 14/15] Documentation: add document for pte_ref Qi Zheng
2021-11-10 14:39   ` Jonathan Corbet
2021-11-11  5:40     ` Qi Zheng
2021-11-10 10:54 ` [PATCH v3 15/15] mm/pte_ref: use mmu_gather to free PTE page table pages Qi Zheng
2021-11-10 12:56 ` [PATCH v3 00/15] Free user " Jason Gunthorpe
2021-11-10 13:25   ` David Hildenbrand
2021-11-10 13:59     ` Qi Zheng
2021-11-10 14:38     ` Jason Gunthorpe
2021-11-10 15:37       ` David Hildenbrand
2021-11-10 16:39         ` Jason Gunthorpe
2021-11-10 17:37           ` David Hildenbrand
2021-11-10 17:49             ` Jason Gunthorpe
2021-11-11  3:58             ` Qi Zheng
2021-11-11  9:22               ` David Hildenbrand
2021-11-11 11:08                 ` Qi Zheng
2021-11-11 11:19                   ` David Hildenbrand
2021-11-11 12:00                     ` Qi Zheng
2021-11-11 12:20                       ` David Hildenbrand
2021-11-11 12:32                         ` Qi Zheng
2021-11-11 12:51                           ` David Hildenbrand
2021-11-11 13:01                             ` Qi Zheng
2021-11-10 16:49         ` Matthew Wilcox
2021-11-10 16:53           ` David Hildenbrand
2021-11-10 16:56             ` Jason Gunthorpe
2021-11-10 13:54   ` Qi Zheng
  -- strict thread matches above, loose matches on Subject: below --
2021-11-10  8:40 Qi Zheng
2021-11-10  8:40 ` [PATCH v3 06/15] mm: introduce refcount for user PTE page table page Qi Zheng

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=202111110851.zOTlo7RL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mika.penttila@nextfour.com \
    --cc=songmuchun@bytedance.com \
    --cc=tglx@linutronix.de \
    --cc=zhengqi.arch@bytedance.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