From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc/numa: Return the first online node instead of 0
Date: Fri, 24 Jun 2022 14:09:59 +0530 [thread overview]
Message-ID: <20220624083959.GA145013@linux.vnet.ibm.com> (raw)
In-Reply-To: <20220623125442.645240-1-aneesh.kumar@linux.ibm.com>
* Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> [2022-06-23 18:24:41]:
> If early cpu to node mapping finds an invalid node id, return
> the first online node instead of node 0.
>
> With commit e75130f20b1f ("powerpc/numa: Offline memoryless cpuless node 0")
> the kernel marks node 0 offline in certain scenarios.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
> arch/powerpc/include/asm/topology.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
> index 8a4d4f4d9749..704088b1d53c 100644
> --- a/arch/powerpc/include/asm/topology.h
> +++ b/arch/powerpc/include/asm/topology.h
> @@ -60,7 +60,7 @@ static inline int early_cpu_to_node(int cpu)
> * Fall back to node 0 if nid is unset (it should be, except bugs).
> * This allows callers to safely do NODE_DATA(early_cpu_to_node(cpu)).
> */
> - return (nid < 0) ? 0 : nid;
> + return (nid < 0) ? first_online_node : nid;
Looks good but just two queries.
1. Is there a possibility of early_cpu_to_node() being called before any
node is online?
2. first_online_node is actually not a variable, it returns the lowest
online node. Right? If lets a early_cpu_to_node() for the same CPU across a
node online/offline may end up giving two different nids. Right?
> }
>
> int of_drconf_to_nid_single(struct drmem_lmb *lmb);
> --
> 2.36.1
>
--
Thanks and Regards
Srikar Dronamraju
next prev parent reply other threads:[~2022-06-24 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 12:54 [PATCH 1/2] powerpc/numa: Return the first online node instead of 0 Aneesh Kumar K.V
2022-06-23 12:54 ` [PATCH 2/2] powerpc/numa: Return the first online node if device tree mapping returns a not online node Aneesh Kumar K.V
2022-06-24 8:50 ` Srikar Dronamraju
2022-06-27 5:27 ` Aneesh Kumar K.V
2022-06-24 8:39 ` Srikar Dronamraju [this message]
2022-06-27 14:05 ` [PATCH 1/2] powerpc/numa: Return the first online node instead of 0 Aneesh Kumar K.V
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=20220624083959.GA145013@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).