[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wobxh60y.fsf@linux.ibm.com>
Date: Mon, 18 Nov 2019 15:15:33 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
To: Dan Williams <dan.j.williams@...el.com>, linux-nvdimm@...ts.01.org
Cc: peterz@...radead.org, vishal.l.verma@...el.com,
dave.hansen@...ux.intel.com, hch@....de,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-acpi@...r.kernel.org
Subject: Re: [PATCH v2 15/18] mm/numa: Skip NUMA_NO_NODE and online nodes in numa_map_to_online_node()
Dan Williams <dan.j.williams@...el.com> writes:
> Update numa_map_to_online_node() to stop falling back to numa node 0
> when the input is NUMA_NO_NODE. Also, skip the lookup if @node is
> online. This makes the routine compatible with other arch node mapping
> routines.
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
>
> Reported-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
> mm/mempolicy.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index e2d8dd21ce9d..d618121bcc17 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -137,8 +137,8 @@ int numa_map_to_online_node(int node)
> {
> int min_node;
>
> - if (node == NUMA_NO_NODE)
> - node = 0;
> + if (node == NUMA_NO_NODE || node_online(node))
> + return node;
>
> min_node = node;
> if (!node_online(node)) {
Powered by blists - more mailing lists