Re: [PATCH 1/4] node: Define and export memory migration path

From: Kirill A. Shutemov
Date: Thu Oct 17 2019 - 07:45:04 EST


On Thu, Oct 17, 2019 at 02:12:05PM +0300, Kirill A. Shutemov wrote:
> > + spin_lock(&node_migration_lock);
> > + WRITE_ONCE(node_migration[nid], TERMINAL_NODE);
> > + spin_unlock(&node_migration_lock);
> > + return count;
> > + }
> > + if (next >= MAX_NUMNODES || !node_online(next))
> > + return -EINVAL;
>
> What prevents offlining after the check?

And what is story with memory hotplug interaction? I don't see any hooks
into memory hotplug to adjust migration path on offlining. Hm?

--
Kirill A. Shutemov