* [PATCH] mm/page_alloc: don't build vm_numa_stat_key if CONFIG_NUMA=n
@ 2026-06-18 10:06 Ben Dooks
2026-06-18 18:09 ` Johannes Weiner
2026-06-18 19:08 ` Zi Yan
0 siblings, 2 replies; 3+ messages in thread
From: Ben Dooks @ 2026-06-18 10:06 UTC (permalink / raw)
To: Andrew Morton, Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
Brendan Jackman, Johannes Weiner, Zi Yan, linux-mm, linux-kernel
Cc: Ben Dooks
The vm_numa_stat_key is only exported if CONFIG_NUMA is set,
so avoid the following warning by guarding it in an #ifdef
on CONFIG_NUMA:
mm/page_alloc.c:165:1: warning: symbol 'vm_numa_stat_key' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
mm/page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d49c254174da..b7d303a94cc1 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -162,7 +162,9 @@ DEFINE_PER_CPU(int, numa_node);
EXPORT_PER_CPU_SYMBOL(numa_node);
#endif
+#ifdef CONFIG_NUMA
DEFINE_STATIC_KEY_TRUE(vm_numa_stat_key);
+#endif
#ifdef CONFIG_HAVE_MEMORYLESS_NODES
/*
--
2.37.2.352.g3c44437643
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/page_alloc: don't build vm_numa_stat_key if CONFIG_NUMA=n
2026-06-18 10:06 [PATCH] mm/page_alloc: don't build vm_numa_stat_key if CONFIG_NUMA=n Ben Dooks
@ 2026-06-18 18:09 ` Johannes Weiner
2026-06-18 19:08 ` Zi Yan
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Weiner @ 2026-06-18 18:09 UTC (permalink / raw)
To: Ben Dooks
Cc: Andrew Morton, Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
Brendan Jackman, Zi Yan, linux-mm, linux-kernel
On Thu, Jun 18, 2026 at 11:06:14AM +0100, Ben Dooks wrote:
> The vm_numa_stat_key is only exported if CONFIG_NUMA is set,
> so avoid the following warning by guarding it in an #ifdef
> on CONFIG_NUMA:
>
> mm/page_alloc.c:165:1: warning: symbol 'vm_numa_stat_key' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/page_alloc: don't build vm_numa_stat_key if CONFIG_NUMA=n
2026-06-18 10:06 [PATCH] mm/page_alloc: don't build vm_numa_stat_key if CONFIG_NUMA=n Ben Dooks
2026-06-18 18:09 ` Johannes Weiner
@ 2026-06-18 19:08 ` Zi Yan
1 sibling, 0 replies; 3+ messages in thread
From: Zi Yan @ 2026-06-18 19:08 UTC (permalink / raw)
To: Ben Dooks, Andrew Morton, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, Brendan Jackman, Johannes Weiner, Zi Yan, linux-mm,
linux-kernel
Cc: srv_ts003
On Thu Jun 18, 2026 at 6:06 AM EDT, Ben Dooks wrote:
> The vm_numa_stat_key is only exported if CONFIG_NUMA is set,
> so avoid the following warning by guarding it in an #ifdef
> on CONFIG_NUMA:
>
> mm/page_alloc.c:165:1: warning: symbol 'vm_numa_stat_key' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> mm/page_alloc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
LGTM. Thanks.
Reviewed-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-18 19:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 10:06 [PATCH] mm/page_alloc: don't build vm_numa_stat_key if CONFIG_NUMA=n Ben Dooks
2026-06-18 18:09 ` Johannes Weiner
2026-06-18 19:08 ` Zi Yan
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.