From: Michal Hocko <mhocko@kernel.org>
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: linux-mm@kvack.org, linux-nvdimm@lists.01.org,
David Hildenbrand <david@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH v3] mm/memory_hotplug: refrain from adding memory into an impossible node
Date: Wed, 15 Apr 2020 12:43:38 +0200 [thread overview]
Message-ID: <20200415104338.GF4629@dhcp22.suse.cz> (raw)
In-Reply-To: <20200414235812.6158-1-vishal.l.verma@intel.com>
On Tue 14-04-20 17:58:12, Vishal Verma wrote:
[...]
> +static int check_hotplug_node(int nid)
> +{
> + int alt_nid;
> +
> + if (node_possible(nid))
> + return nid;
> +
> + alt_nid = numa_map_to_online_node(nid);
> + if (alt_nid == NUMA_NO_NODE)
> + alt_nid = first_online_node;
> + WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
> + "node %d expected, but was absent from the node_possible_map, using %d instead\n",
> + nid, alt_nid);
I really do not like this. Why should we try to be clever and change the
node id requested by the caller? I would just stick with node_possible
check and be done with this.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2020-04-15 10:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 23:58 [PATCH v3] mm/memory_hotplug: refrain from adding memory into an impossible node Vishal Verma
2020-04-15 7:39 ` David Hildenbrand
2020-04-15 7:44 ` David Hildenbrand
2020-04-15 10:43 ` Michal Hocko [this message]
2020-04-15 20:32 ` Verma, Vishal L
2020-04-16 6:19 ` Michal Hocko
2020-04-16 16:13 ` Verma, Vishal L
2020-04-16 16:16 ` David Hildenbrand
2020-04-16 16:18 ` Verma, Vishal L
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=20200415104338.GF4629@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=vishal.l.verma@intel.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).