* include/linux/huge_mm.h:285:undefined reference to `mthp_stats'
@ 2024-05-23 10:07 kernel test robot
2024-05-23 21:00 ` Barry Song
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-05-23 10:07 UTC (permalink / raw)
To: Barry Song
Cc: oe-kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c760b3725e52403dc1b28644fb09c47a83cacea6
commit: ec33687c674934dfefd782a8ffd58370b080b503 mm: add per-order mTHP anon_fault_alloc and anon_fault_fallback counters
date: 2 weeks ago
config: s390-randconfig-r005-20230226 (https://download.01.org/0day-ci/archive/20240523/202405231728.tCAogiSI-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240523/202405231728.tCAogiSI-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/202405231728.tCAogiSI-lkp@intel.com/
All errors (new ones prefixed by >>):
s390-linux-ld: mm/memory.o: in function `count_mthp_stat':
>> include/linux/huge_mm.h:285:(.text+0x191c): undefined reference to `mthp_stats'
s390-linux-ld: mm/huge_memory.o:(.rodata+0x10): undefined reference to `mthp_stats'
vim +285 include/linux/huge_mm.h
279
280 static inline void count_mthp_stat(int order, enum mthp_stat_item item)
281 {
282 if (order <= 0 || order > PMD_ORDER)
283 return;
284
> 285 this_cpu_inc(mthp_stats.stats[order][item]);
286 }
287
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: include/linux/huge_mm.h:285:undefined reference to `mthp_stats' 2024-05-23 10:07 include/linux/huge_mm.h:285:undefined reference to `mthp_stats' kernel test robot @ 2024-05-23 21:00 ` Barry Song 2024-05-24 2:33 ` Yujie Liu 0 siblings, 1 reply; 3+ messages in thread From: Barry Song @ 2024-05-23 21:00 UTC (permalink / raw) To: lkp; +Cc: akpm, linux-kernel, linux-mm, oe-kbuild-all, v-songbaohua > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: c760b3725e52403dc1b28644fb09c47a83cacea6 > commit: ec33687c674934dfefd782a8ffd58370b080b503 mm: add per-order mTHP anon_fault_alloc and anon_fault_fallback counters > date: 2 weeks ago > config: s390-randconfig-r005-20230226 (https://download.01.org/0day-ci/archive/20240523/202405231728.tCAogiSI-lkp@intel.com/config) > compiler: s390-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240523/202405231728.tCAogiSI-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/202405231728.tCAogiSI-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > s390-linux-ld: mm/memory.o: in function `count_mthp_stat': >>> include/linux/huge_mm.h:285:(.text+0x191c): undefined reference to `mthp_stats' > s390-linux-ld: mm/huge_memory.o:(.rodata+0x10): undefined reference to `mthp_stats' > > > vim +285 include/linux/huge_mm.h > > 279 > 280 static inline void count_mthp_stat(int order, enum mthp_stat_item item) > 281 { > 282 if (order <= 0 || order > PMD_ORDER) > 283 return; > 284 >> 285 this_cpu_inc(mthp_stats.stats[order][item]); > 286 } > 287 Thanks, would you please test if the below patch fixes the problem, From: Barry Song <v-songbaohua@oppo.com> Date: Fri, 24 May 2024 08:50:48 +1200 Subject: [PATCH] mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n if CONFIG_SYSFS is not enabled in config, we get the below error, All errors (new ones prefixed by >>): s390-linux-ld: mm/memory.o: in function `count_mthp_stat': >> include/linux/huge_mm.h:285:(.text+0x191c): undefined reference to `mthp_stats' s390-linux-ld: mm/huge_memory.o:(.rodata+0x10): undefined reference to `mthp_stats' vim +285 include/linux/huge_mm.h 279 280 static inline void count_mthp_stat(int order, enum mthp_stat_item item) 281 { 282 if (order <= 0 || order > PMD_ORDER) 283 return; 284 > 285 this_cpu_inc(mthp_stats.stats[order][item]); 286 } 287 Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202405231728.tCAogiSI-lkp@intel.com/ Signed-off-by: Barry Song <v-songbaohua@oppo.com> --- include/linux/huge_mm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index c8d3ec116e29..09c5744d9124 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h @@ -278,6 +278,7 @@ struct mthp_stat { unsigned long stats[ilog2(MAX_PTRS_PER_PTE) + 1][__MTHP_STAT_COUNT]; }; +#ifdef CONFIG_SYSFS DECLARE_PER_CPU(struct mthp_stat, mthp_stats); static inline void count_mthp_stat(int order, enum mthp_stat_item item) @@ -287,6 +288,11 @@ static inline void count_mthp_stat(int order, enum mthp_stat_item item) this_cpu_inc(mthp_stats.stats[order][item]); } +#else +static inline void count_mthp_stat(int order, enum mthp_stat_item item) +{ +} +#endif #define transparent_hugepage_use_zero_page() \ (transparent_hugepage_flags & \ -- 2.34.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: include/linux/huge_mm.h:285:undefined reference to `mthp_stats' 2024-05-23 21:00 ` Barry Song @ 2024-05-24 2:33 ` Yujie Liu 0 siblings, 0 replies; 3+ messages in thread From: Yujie Liu @ 2024-05-24 2:33 UTC (permalink / raw) To: Barry Song; +Cc: lkp, akpm, linux-kernel, linux-mm, oe-kbuild-all, v-songbaohua On Fri, May 24, 2024 at 09:00:45AM +1200, Barry Song wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > head: c760b3725e52403dc1b28644fb09c47a83cacea6 > > commit: ec33687c674934dfefd782a8ffd58370b080b503 mm: add per-order mTHP anon_fault_alloc and anon_fault_fallback counters > > date: 2 weeks ago > > config: s390-randconfig-r005-20230226 (https://download.01.org/0day-ci/archive/20240523/202405231728.tCAogiSI-lkp@intel.com/config) > > compiler: s390-linux-gcc (GCC) 13.2.0 > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240523/202405231728.tCAogiSI-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/202405231728.tCAogiSI-lkp@intel.com/ > > > > All errors (new ones prefixed by >>): > > > > s390-linux-ld: mm/memory.o: in function `count_mthp_stat': > >>> include/linux/huge_mm.h:285:(.text+0x191c): undefined reference to `mthp_stats' > > s390-linux-ld: mm/huge_memory.o:(.rodata+0x10): undefined reference to `mthp_stats' > > > > > > vim +285 include/linux/huge_mm.h > > > > 279 > > 280 static inline void count_mthp_stat(int order, enum mthp_stat_item item) > > 281 { > > 282 if (order <= 0 || order > PMD_ORDER) > > 283 return; > > 284 > >> 285 this_cpu_inc(mthp_stats.stats[order][item]); > > 286 } > > 287 > > Thanks, would you please test if the below patch fixes the problem, The patch below fixes the problem for me. Thanks. Tested-by: Yujie Liu <yujie.liu@intel.com> > > From: Barry Song <v-songbaohua@oppo.com> > Date: Fri, 24 May 2024 08:50:48 +1200 > Subject: [PATCH] mm: huge_mm: fix undefined reference to `mthp_stats' for > CONFIG_SYSFS=n > > if CONFIG_SYSFS is not enabled in config, we get the below error, > > All errors (new ones prefixed by >>): > > s390-linux-ld: mm/memory.o: in function `count_mthp_stat': > >> include/linux/huge_mm.h:285:(.text+0x191c): undefined reference to `mthp_stats' > s390-linux-ld: mm/huge_memory.o:(.rodata+0x10): undefined reference to `mthp_stats' > > vim +285 include/linux/huge_mm.h > > 279 > 280 static inline void count_mthp_stat(int order, enum mthp_stat_item item) > 281 { > 282 if (order <= 0 || order > PMD_ORDER) > 283 return; > 284 > > 285 this_cpu_inc(mthp_stats.stats[order][item]); > 286 } > 287 > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202405231728.tCAogiSI-lkp@intel.com/ > Signed-off-by: Barry Song <v-songbaohua@oppo.com> > --- > include/linux/huge_mm.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h > index c8d3ec116e29..09c5744d9124 100644 > --- a/include/linux/huge_mm.h > +++ b/include/linux/huge_mm.h > @@ -278,6 +278,7 @@ struct mthp_stat { > unsigned long stats[ilog2(MAX_PTRS_PER_PTE) + 1][__MTHP_STAT_COUNT]; > }; > > +#ifdef CONFIG_SYSFS > DECLARE_PER_CPU(struct mthp_stat, mthp_stats); > > static inline void count_mthp_stat(int order, enum mthp_stat_item item) > @@ -287,6 +288,11 @@ static inline void count_mthp_stat(int order, enum mthp_stat_item item) > > this_cpu_inc(mthp_stats.stats[order][item]); > } > +#else > +static inline void count_mthp_stat(int order, enum mthp_stat_item item) > +{ > +} > +#endif > > #define transparent_hugepage_use_zero_page() \ > (transparent_hugepage_flags & \ > -- > 2.34.1 > > > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-24 2:41 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-05-23 10:07 include/linux/huge_mm.h:285:undefined reference to `mthp_stats' kernel test robot 2024-05-23 21:00 ` Barry Song 2024-05-24 2:33 ` Yujie Liu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox