linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 12061/12283] mm/khugepaged.c:435:undefined reference to `shmem_hpage_pmd_enabled'
@ 2024-09-17 11:36 kernel test robot
  2024-09-17 12:11 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-09-17 11:36 UTC (permalink / raw)
  To: Baolin Wang
  Cc: oe-kbuild-all, Linux Memory Management List, Andrew Morton, Ryan Roberts

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   4f3e012d4cfd1d9bf837870c961f462ca9f23ebe
commit: 8b07e88e36961c4785dd13dbdbb5d7977b458940 [12061/12283] mm: shmem: fix khugepaged activation policy for shmem
config: loongarch-randconfig-s042-20221209 (https://download.01.org/0day-ci/archive/20240917/202409171905.9gqKNeeL-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240917/202409171905.9gqKNeeL-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409171905.9gqKNeeL-lkp@intel.com/

All errors (new ones prefixed by >>):

   loongarch64-linux-ld: mm/khugepaged.o: in function `hugepage_pmd_enabled':
>> mm/khugepaged.c:435:(.text+0x2338): undefined reference to `shmem_hpage_pmd_enabled'


vim +435 mm/khugepaged.c

   415	
   416	static bool hugepage_pmd_enabled(void)
   417	{
   418		/*
   419		 * We cover the anon, shmem and the file-backed case here; file-backed
   420		 * hugepages, when configured in, are determined by the global control.
   421		 * Anon pmd-sized hugepages are determined by the pmd-size control.
   422		 * Shmem pmd-sized hugepages are also determined by its pmd-size control,
   423		 * except when the global shmem_huge is set to SHMEM_HUGE_DENY.
   424		 */
   425		if (IS_ENABLED(CONFIG_READ_ONLY_THP_FOR_FS) &&
   426		    hugepage_global_enabled())
   427			return true;
   428		if (test_bit(PMD_ORDER, &huge_anon_orders_always))
   429			return true;
   430		if (test_bit(PMD_ORDER, &huge_anon_orders_madvise))
   431			return true;
   432		if (test_bit(PMD_ORDER, &huge_anon_orders_inherit) &&
   433		    hugepage_global_enabled())
   434			return true;
 > 435		if (shmem_hpage_pmd_enabled())
   436			return true;
   437		return false;
   438	}
   439	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-next:master 12061/12283] mm/khugepaged.c:435:undefined reference to `shmem_hpage_pmd_enabled'
  2024-09-17 11:36 [linux-next:master 12061/12283] mm/khugepaged.c:435:undefined reference to `shmem_hpage_pmd_enabled' kernel test robot
@ 2024-09-17 12:11 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2024-09-17 12:11 UTC (permalink / raw)
  To: kernel test robot
  Cc: Baolin Wang, oe-kbuild-all, Linux Memory Management List, Ryan Roberts

On Tue, 17 Sep 2024 19:36:47 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   4f3e012d4cfd1d9bf837870c961f462ca9f23ebe
> commit: 8b07e88e36961c4785dd13dbdbb5d7977b458940 [12061/12283] mm: shmem: fix khugepaged activation policy for shmem
> config: loongarch-randconfig-s042-20221209 (https://download.01.org/0day-ci/archive/20240917/202409171905.9gqKNeeL-lkp@intel.com/config)
> compiler: loongarch64-linux-gcc (GCC) 13.3.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240917/202409171905.9gqKNeeL-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202409171905.9gqKNeeL-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    loongarch64-linux-ld: mm/khugepaged.o: in function `hugepage_pmd_enabled':
> >> mm/khugepaged.c:435:(.text+0x2338): undefined reference to `shmem_hpage_pmd_enabled'

Thanks.  I think this:

From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-shmem-fix-khugepaged-activation-policy-for-shmem-fix
Date: Tue Sep 17 05:06:48 AM PDT 2024

fix build with CONFIG_SHMEM=n

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409171905.9gqKNeeL-lkp@intel.com/
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/shmem_fs.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/include/linux/shmem_fs.h~mm-shmem-fix-khugepaged-activation-policy-for-shmem-fix
+++ a/include/linux/shmem_fs.h
@@ -114,7 +114,6 @@ int shmem_unuse(unsigned int type);
 unsigned long shmem_allowable_huge_orders(struct inode *inode,
 				struct vm_area_struct *vma, pgoff_t index,
 				loff_t write_end, bool shmem_huge_force);
-bool shmem_hpage_pmd_enabled(void);
 #else
 static inline unsigned long shmem_allowable_huge_orders(struct inode *inode,
 				struct vm_area_struct *vma, pgoff_t index,
@@ -123,6 +122,11 @@ static inline unsigned long shmem_allowa
 	return 0;
 }
 
+#endif
+
+#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && defined(SHMEM)
+bool shmem_hpage_pmd_enabled(void);
+#else
 static inline bool shmem_hpage_pmd_enabled(void)
 {
 	return false;
_



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-17 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-17 11:36 [linux-next:master 12061/12283] mm/khugepaged.c:435:undefined reference to `shmem_hpage_pmd_enabled' kernel test robot
2024-09-17 12:11 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox