On 3/8/21 4:03 PM, Yang Shi wrote:
>> +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 <shy828...@gmail.com>

Thanks for noticing that.  I've fixed it up.


Reply via email to