From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Nathan Fontenot <nfont@linux.vnet.ibm.com>,
paulus@samba.org
Subject: Re: [RFC PATCH v3 3/3] powerpc: some changes in numa_setup_cpu()
Date: Tue, 2 Sep 2014 20:04:18 -0700 [thread overview]
Message-ID: <20140903030418.GC31420@linux.vnet.ibm.com> (raw)
In-Reply-To: <1409132041-11890-3-git-send-email-zhong@linux.vnet.ibm.com>
On 27.08.2014 [17:34:01 +0800], Li Zhong wrote:
> this patches changes some error handling logics in numa_setup_cpu(),
> when cpu node is not found, so:
>
> if the cpu is possible, but not present, -1 is kept in numa_cpu_lookup_table,
> so later, if the cpu is added, we could set correct numa information for it.
>
> if the cpu is present, then we set the first online node to
> numa_cpu_lookup_table instead of 0 ( in case 0 might not be an online node? )
Not currently possible (Node 0 is always online), but I'm working on
changing that :)
>
> Cc: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Acked-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
> ---
> arch/powerpc/mm/numa.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index 3a9061e..ec32d46 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -538,7 +538,7 @@ static int of_drconf_to_nid_single(struct of_drconf_cell *drmem,
> */
> static int numa_setup_cpu(unsigned long lcpu)
> {
> - int nid;
> + int nid = -1;
> struct device_node *cpu;
>
> /*
> @@ -555,19 +555,21 @@ static int numa_setup_cpu(unsigned long lcpu)
>
> if (!cpu) {
> WARN_ON(1);
> - nid = 0;
> - goto out;
> + if (cpu_present(lcpu))
> + goto out_present;
> + else
> + goto out;
> }
>
> nid = of_node_to_nid_single(cpu);
>
> +out_present:
> if (nid < 0 || !node_online(nid))
> nid = first_online_node;
> -out:
> - map_cpu_to_node(lcpu, nid);
>
> + map_cpu_to_node(lcpu, nid);
> of_node_put(cpu);
> -
> +out:
> return nid;
> }
>
> --
> 1.9.1
>
next prev parent reply other threads:[~2014-09-03 14:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 9:33 [RFC PATCH v3 1/3] powerpc: Fix warning reported by verify_cpu_node_mapping() Li Zhong
2014-08-27 9:34 ` [RFC PATCH v3 2/3] powerpc: Only set numa node information for present cpus at boottime Li Zhong
2014-09-03 3:02 ` Nishanth Aravamudan
2014-09-04 3:53 ` Cyril Bur
2014-08-27 9:34 ` [RFC PATCH v3 3/3] powerpc: some changes in numa_setup_cpu() Li Zhong
2014-09-03 3:04 ` Nishanth Aravamudan [this message]
2014-09-03 3:01 ` [RFC PATCH v3 1/3] powerpc: Fix warning reported by verify_cpu_node_mapping() Nishanth Aravamudan
2014-10-02 21:13 ` Nishanth Aravamudan
2014-10-02 21:28 ` Benjamin Herrenschmidt
2014-10-02 21:53 ` Nishanth Aravamudan
2014-10-02 22:23 ` Benjamin Herrenschmidt
2014-10-03 0:50 ` Michael Ellerman
2014-10-03 23:26 ` Nishanth Aravamudan
2014-10-07 6:28 ` Michael Ellerman
2014-10-07 15:33 ` Nishanth Aravamudan
2014-10-08 4:51 ` Li Zhong
2014-10-14 2:39 ` Li Zhong
2014-10-14 4:35 ` Michael Ellerman
2014-10-15 7:34 ` Li Zhong
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=20140903030418.GC31420@linux.vnet.ibm.com \
--to=nacc@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nfont@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=zhong@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).