Re: [PATCH] mm/memory_hotplug: return early from try_online_node() for online nodes
From: David Hildenbrand
Date: Mon Nov 30 2026 - 05:56:36 EST
On Mon, 30 Nov 2026 01:37:51 -0500, Qiliang Yuan wrote:
> cpu_up() calls try_online_node() for the node of every CPU it brings up,
> so that a CPU on a memoryless node that is not online yet gets its node
> onlined first. try_online_node() takes mem_hotplug_lock for write with
> mem_hotplug_begin() before it checks whether the node is online.
>
> mem_hotplug_lock is a percpu rwsem, and taking it for write waits for an
> RCU grace period unless another writer released it shortly before.
> Bringing a CPU online through sysfs, as done when hot-adding vCPUs to a
> VM, therefore waits for a grace period although the node of the CPU is
> almost always online already.
>
> [...]
Applied, thanks!
tree: mm/core.git
branch: memhp-7.5.misc
Applied patches will appear soon in mm-next, followed by linux-next.
Please report any outstanding bugs that were missed during review, so we
can either drop the patch series or decide how to fix it up.
It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even
though the patches have already been applied. If possible, patch trailers
will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. Further, this is not a guarantee that the
patches will go upstream. If in doubt, please check the listed branch.
[1/1] mm/memory_hotplug: return early from try_online_node() for online nodes
https://git.kernel.org/mm/core/c/1a4211ca
--
Cheers,
David