From: Oscar Salvador <osalvador@suse.de>
To: Gregory Price <gourry@gourry.net>
Cc: Rakie Kim <rakie.kim@sk.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org,
joshua.hahnjy@gmail.com, dan.j.williams@intel.com,
ying.huang@linux.alibaba.com, david@redhat.com,
Jonathan.Cameron@huawei.com, kernel_team@skhynix.com,
honggyu.kim@sk.com, yunjeong.mun@sk.com
Subject: Re: [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
Date: Wed, 2 Apr 2025 17:41:57 +0200 [thread overview]
Message-ID: <Z-1axdrOVBYESrXo@localhost.localdomain> (raw)
In-Reply-To: <Z-1GUrdcOeYQgkE3@gourry-fedora-PF4VCD3F>
On Wed, Apr 02, 2025 at 10:14:42AM -0400, Gregory Price wrote:
> On Wed, Apr 02, 2025 at 11:51:17AM +0200, Oscar Salvador wrote:
> > > + case MEM_OFFLINE:
> > > + if (!node_state(nid, N_MEMORY))
> > > + sysfs_wi_node_release(nid);
> >
> > This check is not needed.
> >
> > If status_change_nid is different than NUMA_NO_NODE, it means that the memory
> > state of the numa node was effectively changed.
> > So doing:
> >
> > case MEM_OFFLINE:
> > sysfs_wi_node_release(nid)
> >
> > is enough.
>
> offline_pages will call this callback unconditionally any time it's
> called (and succeeds). If 2 dax devices online into the same node, it's
Yes, this callback will be called whenever {online,offline}_pages succeeds, but
status_change_nid will be != NUMA_NO_NODE IFF the node state changes.
And you already have the check
if (nid < 0)
goto out
at the beginning, which means that all {offline,online}_pages operation that
do not carry a numa node state change will be filtered out there.
Makes sense, or am I missing something?
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2025-04-02 15:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 1:49 [PATCH v5 0/3] Enhance sysfs handling for " Rakie Kim
2025-04-02 1:49 ` [PATCH v5 1/3] mm/mempolicy: Fix memory leaks in weighted interleave sysfs Rakie Kim
2025-04-02 1:49 ` [PATCH v5 2/3] mm/mempolicy: Support dynamic sysfs updates for weighted interleave Rakie Kim
2025-04-02 1:49 ` [PATCH v5 3/3] mm/mempolicy: Support memory hotplug in " Rakie Kim
2025-04-02 4:18 ` Honggyu Kim
2025-04-02 4:34 ` Andrew Morton
2025-04-02 5:15 ` Gregory Price
2025-04-02 5:23 ` Gregory Price
2025-04-02 5:32 ` Honggyu Kim
2025-04-02 9:51 ` Oscar Salvador
2025-04-02 14:14 ` Gregory Price
2025-04-02 15:41 ` Oscar Salvador [this message]
2025-04-02 16:36 ` Gregory Price
2025-04-03 4:26 ` Rakie Kim
2025-04-03 5:45 ` Rakie Kim
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=Z-1axdrOVBYESrXo@localhost.localdomain \
--to=osalvador@suse.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=gourry@gourry.net \
--cc=honggyu.kim@sk.com \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel_team@skhynix.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rakie.kim@sk.com \
--cc=ying.huang@linux.alibaba.com \
--cc=yunjeong.mun@sk.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