linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"david@redhat.com" <david@redhat.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"mhocko@kernel.org" <mhocko@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
Subject: Re: [PATCH v4] mm/memory_hotplug: refrain from adding memory into an impossible node
Date: Thu, 16 Apr 2020 17:23:02 +0000	[thread overview]
Message-ID: <0983dbe3a19d1a074a5959e91f315756ded4c90e.camel@intel.com> (raw)
In-Reply-To: <185a067e-5864-100c-9a9a-6fd90f47ff43@redhat.com>

On Thu, 2020-04-16 at 19:12 +0200, David Hildenbrand wrote:
> On 16.04.20 19:10, Vishal Verma wrote:
> > 
> > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> > index 0a54ffac8c68..ddd3347edd54 100644
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -1005,6 +1005,11 @@ int __ref add_memory_resource(int nid, struct resource *res)
> >  	if (ret)
> >  		return ret;
> >  
> > +	if (!node_possible(nid)) {
> > +		WARN(1, "node %d was absent from the node_possible_map\n", nid);
> > +		return -ENXIO;
> 
> Nit: I suggest using "-EINVAL" instead (e.g., returned via
> check_hotplug_memory_range).
> 
> Not sure if we should pr_err() instead of WARN (see e.g.,
> check_hotplug_memory_range)
> 
Hm, I'm happy to make the changes, but EINVAL to me suggests there is a
problem in the way this was called by the user. And in this case there
really might not be much the user can change in case fo buggy firmware.

Same thing with the WARN - make the potential firmware bug much more
obvious and visible.

  reply	other threads:[~2020-04-16 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 17:10 Vishal Verma
2020-04-16 17:12 ` David Hildenbrand
2020-04-16 17:23   ` Verma, Vishal L [this message]
2020-04-16 17:25     ` David Hildenbrand
2020-04-16 17:53       ` David Hildenbrand
2020-04-16 22:47         ` 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=0983dbe3a19d1a074a5959e91f315756ded4c90e.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --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=mhocko@kernel.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