From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Matt Fleming <matt@codeblueprint.co.uk>,
Mel Gorman <mgorman@suse.de>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>, Gon Solo <gonsolo@gmail.com>,
linux-mm@kvack.org, linux-sh@vger.kernel.org,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 1/2] mm: Move node_reclaim_distance to fix NUMA without SMP
Date: Thu, 16 Sep 2021 10:42:42 +0200 [thread overview]
Message-ID: <6432666a648dde85635341e6c918cee97c97d264.1631781495.git.geert+renesas@glider.be> (raw)
In-Reply-To: <cover.1631781495.git.geert+renesas@glider.be>
If CONFIG_NUMA=y, but CONFIG_SMP=n (e.g. sh/migor_defconfig):
sh4-linux-gnu-ld: mm/page_alloc.o: in function `get_page_from_freelist':
page_alloc.c:(.text+0x2c24): undefined reference to `node_reclaim_distance'
Fix this by moving the declaration of node_reclaim_distance from an
SMP-only to a generic file.
Fixes: a55c7454a8c887b2 ("sched/topology: Improve load balancing on AMD EPYC systems")
Suggested-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
kernel/sched/topology.c | 1 -
mm/page_alloc.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 4e8698e62f0754a3..738ee7fa79724c7d 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1481,7 +1481,6 @@ static int sched_domains_curr_level;
int sched_max_numa_distance;
static int *sched_domains_numa_distance;
static struct cpumask ***sched_domains_numa_masks;
-int __read_mostly node_reclaim_distance = RECLAIM_DISTANCE;
static unsigned long __read_mostly *sched_numa_onlined_nodes;
#endif
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b37435c274cf1cb1..8b2d7a9bae6c1754 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3966,6 +3966,8 @@ bool zone_watermark_ok_safe(struct zone *z, unsigned int order,
}
#ifdef CONFIG_NUMA
+int __read_mostly node_reclaim_distance = RECLAIM_DISTANCE;
+
static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone)
{
return node_distance(zone_to_nid(local_zone), zone_to_nid(zone)) <=
--
2.25.1
next prev parent reply other threads:[~2021-09-16 8:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 8:42 [PATCH 0/2] Fix NUMA without SMP Geert Uytterhoeven
2021-09-16 8:42 ` Geert Uytterhoeven [this message]
2021-09-21 12:32 ` [PATCH 1/2] mm: Move node_reclaim_distance to fix " Mel Gorman
2021-09-16 8:42 ` [PATCH 2/2] mm: Move fold_vm_numa_events() " Geert Uytterhoeven
2021-09-21 12:33 ` Mel Gorman
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=6432666a648dde85635341e6c918cee97c97d264.1631781495.git.geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=akpm@linux-foundation.org \
--cc=dalias@libc.org \
--cc=gonsolo@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-sh@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vbabka@suse.cz \
--cc=vincent.guittot@linaro.org \
--cc=ysato@users.sourceforge.jp \
/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;
as well as URLs for NNTP newsgroup(s).