Re: [PATCH v3 3/3] mm/mempolicy: Support memory hotplug in weighted interleave

From: Gregory Price
Date: Mon Mar 24 2025 - 09:33:08 EST


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