* + mm-huge_mm-fix-undefined-reference-to-mthp_stats-for-config_sysfs=n.patch added to mm-hotfixes-unstable branch
@ 2024-05-24 2:45 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-05-24 2:45 UTC (permalink / raw)
To: mm-commits, yujie.liu, lkp, v-songbaohua, akpm
The patch titled
Subject: mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-huge_mm-fix-undefined-reference-to-mthp_stats-for-config_sysfs=n.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-huge_mm-fix-undefined-reference-to-mthp_stats-for-config_sysfs=n.patch
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Barry Song <v-songbaohua@oppo.com>
Subject: mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n
Date: Fri, 24 May 2024 08:50:48 +1200
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
Link: https://lkml.kernel.org/r/20240523210045.40444-1-21cnbao@gmail.com
Fixes: ec33687c6749 ("mm: add per-order mTHP anon_fault_alloc and anon_fault_fallback counters")
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>
Tested-by: Yujie Liu <yujie.liu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/huge_mm.h | 6 ++++++
1 file changed, 6 insertions(+)
--- a/include/linux/huge_mm.h~mm-huge_mm-fix-undefined-reference-to-mthp_stats-for-config_sysfs=n
+++ a/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 o
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 & \
_
Patches currently in -mm which might be from v-songbaohua@oppo.com are
mm-huge_mm-fix-undefined-reference-to-mthp_stats-for-config_sysfs=n.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-24 2:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 2:45 + mm-huge_mm-fix-undefined-reference-to-mthp_stats-for-config_sysfs=n.patch added to mm-hotfixes-unstable branch Andrew Morton
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.