From: Peter Zijlstra <peterz@infradead.org>
To: Laurent Vivier <lvivier@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Borislav Petkov <bp@suse.de>,
David Gibson <david@gibson.dropbear.id.au>,
Michael Ellerman <mpe@ellerman.id.au>,
Nathan Fontenot <nfont@linux.vnet.ibm.com>,
Michael Bringmann <mwb@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@redhat.com>
Subject: Re: [RFC v3] sched/topology: fix kernel crash when a CPU is hotplugged in a memoryless node
Date: Fri, 15 Mar 2019 13:25:56 +0100 [thread overview]
Message-ID: <20190315122556.GE6058@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <77b142fe-0886-1510-28bd-d432ea2c796a@redhat.com>
On Fri, Mar 15, 2019 at 12:12:45PM +0100, Laurent Vivier wrote:
> Another way to avoid the nodes overlapping for the offline nodes at
> startup is to ensure the default values don't define a distance that
> merge all offline nodes into node 0.
>
> A powerpc specific patch can workaround the kernel crash by doing this:
>
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index 87f0dd0..3ba29bb 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -623,6 +623,7 @@ static int __init parse_numa_properties(void)
> struct device_node *memory;
> int default_nid = 0;
> unsigned long i;
> + int nid, dist;
>
> if (numa_enabled == 0) {
> printk(KERN_WARNING "NUMA disabled by user\n");
> @@ -636,6 +637,10 @@ static int __init parse_numa_properties(void)
>
> dbg("NUMA associativity depth for CPU/Memory: %d\n",
> min_common_depth);
>
> + for (nid = 0; nid < MAX_NUMNODES; nid ++)
> + for (dist = 0; dist < MAX_DISTANCE_REF_POINTS; dist++)
> + distance_lookup_table[nid][dist] = nid;
> +
> /*
> * Even though we connect cpus to numa domains later in SMP
> * init, we need to know the node ids now. This is because
What does that actually do? That is, what does it make the distance
table look like before and after you bring up the CPUs?
> Any comment?
Well, I had a few questions here:
20190305115952.GH32477@hirez.programming.kicks-ass.net
that I've not yet seen answers to.
next prev parent reply other threads:[~2019-03-15 12:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 19:59 Laurent Vivier
2019-03-05 11:59 ` Peter Zijlstra
2019-03-18 10:47 ` Srikar Dronamraju
2019-03-18 11:26 ` Peter Zijlstra
2019-03-15 11:12 ` Laurent Vivier
2019-03-15 12:25 ` Peter Zijlstra [this message]
2019-03-15 13:05 ` Laurent Vivier
2019-03-18 11:06 ` Srikar Dronamraju
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=20190315122556.GE6058@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lvivier@redhat.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=mwb@linux.vnet.ibm.com \
--cc=nfont@linux.vnet.ibm.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=suravee.suthikulpanit@amd.com \
/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
Powered by JetHome