From: Oscar Salvador <osalvador@suse.de>
To: Hannes Reinecke <hare@kernel.org>
Cc: David Hildenbrand <david@redhat.com>, linux-mm@kvack.org
Subject: Re: [PATCH 2/2] mm/memory_hotplug: activate node before adding new memory blocks
Date: Tue, 1 Jul 2025 16:02:08 +0200 [thread overview]
Message-ID: <aGPqYF_VDSMRWyur@localhost.localdomain> (raw)
In-Reply-To: <20250701114155.16452-3-hare@kernel.org>
On Tue, Jul 01, 2025 at 01:41:54PM +0200, Hannes Reinecke wrote:
> @@ -1540,8 +1540,16 @@ int add_memory_resource(int nid, struct resource *res, mhp_t mhp_flags)
>
> ret = __try_online_node(nid, false);
> if (ret < 0)
> - goto error;
> - new_node = ret;
> + goto error_memblock_remove;
> + if (ret) {
> + node_set_online(nid);
> + ret = __register_one_node(nid);
> + if (WARN_ON(ret)) {
> + node_set_offline(nid);
> + goto error_memblock_remove;
> + }
> + new_node = true;
> + }
Do we have any constraints wrt. having the node onlined before calling in
__register_one_node() ?
This is a sensitive path (convulated :-) heh), but unless I'm missing anything,
it should be ok to call node_set_online after, right?
If so, the above could be simplified.
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2025-07-01 14:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 11:41 [PATCH 0/2] mm/memory_hotplug: fixup crash during uevent handling Hannes Reinecke
2025-07-01 11:41 ` [PATCH 1/2] drivers/base/memory: add node id parameter to add_memory_block() Hannes Reinecke
2025-07-01 11:55 ` David Hildenbrand
2025-07-01 13:57 ` Oscar Salvador
2025-07-01 11:41 ` [PATCH 2/2] mm/memory_hotplug: activate node before adding new memory blocks Hannes Reinecke
2025-07-01 12:09 ` David Hildenbrand
2025-07-01 12:18 ` Hannes Reinecke
2025-07-01 14:02 ` Oscar Salvador [this message]
2025-07-01 18:52 ` Oscar Salvador
2025-07-01 18:55 ` Oscar Salvador
2025-07-01 19:23 ` David Hildenbrand
2025-07-02 5:24 ` Oscar Salvador
2025-07-02 6:25 ` Donet Tom
2025-07-02 6:36 ` David Hildenbrand
2025-07-02 7:52 ` Hannes Reinecke
2025-07-01 11:53 ` [PATCH 0/2] mm/memory_hotplug: fixup crash during uevent handling David Hildenbrand
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=aGPqYF_VDSMRWyur@localhost.localdomain \
--to=osalvador@suse.de \
--cc=david@redhat.com \
--cc=hare@kernel.org \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.