From: Oscar Salvador <osalvador@suse.de>
To: Honggyu Kim <honggyu.kim@sk.com>
Cc: Gregory Price <gourry@gourry.net>,
kernel_team@skhynix.com,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Vlastimil Babka <vbabka@suse.cz>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Rakie Kim <rakie.kim@sk.com>, Harry Yoo <harry.yoo@oracle.com>,
dan.carpenter@linaro.org
Subject: Re: [PATCH v3 2/3] mm,memory_hotplug: Implement numa node notifier
Date: Tue, 3 Jun 2025 11:14:07 +0200 [thread overview]
Message-ID: <aD683wrmR12g5xB9@localhost.localdomain> (raw)
In-Reply-To: <3ad3bcba-b8b6-4e30-8ad9-adba5761e923@sk.com>
On Wed, May 28, 2025 at 11:23:53AM +0900, Honggyu Kim wrote:
> The 'err' of sysfs_wi_node_add() wasn't propagated to its caller before
> this change as discussed with David at the following.
> https://lore.kernel.org/198f2cbe-b1cb-4239-833e-9aac33d978fa@redhat.com
>
> But as Gregory mentioned, we can pass 'err' now with this numa node notifier
> so for this hunk, shouldn't we add the following change on top of this?
>
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 3a7717e09506..3073ebd4e7ee 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -3792,7 +3792,7 @@ static int sysfs_wi_node_add(int nid)
> static int wi_node_notifier(struct notifier_block *nb,
> unsigned long action, void *data)
> {
> - int err;
> + int err = 0;
> struct node_notify *arg = data;
> int nid = arg->status_change_nid;
>
> @@ -3811,7 +3811,7 @@ static int wi_node_notifier(struct notifier_block *nb,
> break;
> }
>
> - return NOTIFY_OK;
> + return notifier_from_errno(err);
I do not think so.
NODE_BECAME_MEM_AWARE is already too late to react.
We only tell the system that __now__ we are in this state, so there is
no rollback possible from this point forward.
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2025-06-03 9:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 8:36 [PATCH v3 0/3] " Oscar Salvador
2025-05-02 8:36 ` [PATCH v3 1/3] mm,slub: Do not special case N_NORMAL nodes for slab_nodes Oscar Salvador
2025-05-05 13:43 ` Vlastimil Babka
2025-05-02 8:36 ` [PATCH v3 2/3] mm,memory_hotplug: Implement numa node notifier Oscar Salvador
2025-05-02 15:28 ` Gregory Price
2025-05-05 14:51 ` Dan Carpenter
2025-05-28 2:23 ` Honggyu Kim
2025-06-03 9:14 ` Oscar Salvador [this message]
2025-05-02 19:09 ` ALOK TIWARI
2025-05-05 13:58 ` Vlastimil Babka
2025-05-02 8:36 ` [PATCH v3 3/3] mm,memory_hotplug: Rename status_change_nid parameter in memory_notify Oscar Salvador
2025-05-02 19:15 ` ALOK TIWARI
2025-05-04 3:03 ` [PATCH v3 0/3] Implement numa node notifier Andrew Morton
2025-05-04 5:44 ` Oscar Salvador
2025-05-04 6:16 ` Andrew Morton
2025-05-05 17:07 ` Gregory Price
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=aD683wrmR12g5xB9@localhost.localdomain \
--to=osalvador@suse.de \
--cc=42.hyeyoo@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@linaro.org \
--cc=david@redhat.com \
--cc=gourry@gourry.net \
--cc=harry.yoo@oracle.com \
--cc=honggyu.kim@sk.com \
--cc=kernel_team@skhynix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rakie.kim@sk.com \
--cc=vbabka@suse.cz \
/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