Re: [PATCH v3 3/3] mm/mempolicy: Support memory hotplug in weighted interleave
From: Rakie Kim
Date: Tue Mar 25 2025 - 06:33:28 EST
On Mon, 24 Mar 2025 09:32:49 -0400 Gregory Price <gourry@xxxxxxxxxx> wrote:
> On Mon, Mar 24, 2025 at 05:54:27PM +0900, Rakie Kim wrote:
> >
> > I'm sorry, the code is missing.
> > I may not fully understand the scenario you described, but I think your concern
> > can be addressed by adding a simple check like the following:
> >
> > case MEM_OFFLINE:
> > if (!node_state(nid, N_MEMORY)) --> this point
> > sysfs_wi_node_release(nid);
> >
>
> This should work. I have some questions about whether there might be
> some subtle race conditions with this implementation, but I can take a
> look after LSFMM. (Example: Two blocks being offlined/onlined at the
> same time, is state(nid, N_MEMORY) a raced value?)
>
> ~Gregory
I will also further review the code for any race condition
issues. I intend to update v4 to incorporate the discussions
from this patch series. Your feedback and review of v4 after
LSFMM would be greatly appreciated.
Rakie