Thread (28 messages) 28 messages, 4 authors, 2021-03-20

Re: [PATCH 03/10] mm/migrate: update node demotion order during on hotplug events

From: Dave Hansen <hidden>
Date: 2021-03-09 22:09:00
Also in: lkml

On 3/8/21 4:03 PM, Yang Shi wrote:
quoted
+static int __meminit migrate_on_reclaim_callback(struct notifier_block *self,
+                                                unsigned long action, void *arg)
+{
+       switch (action) {
+       case MEM_GOING_OFFLINE:
+               /*
+                * Make sure there are not transient states where
+                * an offline node is a migration target.  This
+                * will leave migration disabled until the offline
+                * completes and the MEM_OFFLINE case below runs.
+                */
+               disable_all_migrate_targets();
+
+               /*
+                * Ensure the disable operation is globally visible.
+                * This avoids readers ever being able to
+                * simultaneously observe the old (pre-hotplug) and
+                * new (post-hotplug) migration targets.
+                */
+               synchronize_rcu();
It seems disable_all_migrate_targets() already has synchronize_rcu()
called. We don't need to call it twice. Otherwise, it looks good to
me. Reviewed-by: Yang Shi [off-list ref]
Thanks for noticing that.  I've fixed it up.


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help