Re: [PATCH -V10 2/9] mm/migrate: update node demotion order on hotplug events

From: Zi Yan
Date: Thu Jul 15 2021 - 14:01:00 EST


On 15 Jul 2021, at 1:51, Huang Ying wrote:

> From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
>
> Reclaim-based migration is attempting to optimize data placement in
> memory based on the system topology. If the system changes, so must
> the migration ordering.
>
> The implementation is conceptually simple and entirely unoptimized.
> On any memory or CPU hotplug events, assume that a node was added or
> removed and recalculate all migration targets. This ensures that the
> node_demotion[] array is always ready to be used in case the new
> reclaim mode is enabled.
>
> This recalculation is far from optimal, most glaringly that it does
> not even attempt to figure out the hotplug event would have some
> *actual* effect on the demotion order. But, given the expected
> paucity of hotplug events, this should be fine.
>
> Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> Signed-off-by: "Huang, Ying" <ying.huang@xxxxxxxxx>
> Reviewed-by: Yang Shi <shy828301@xxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxx>
> Cc: Wei Xu <weixugc@xxxxxxxxxx>
> Cc: Zi Yan <ziy@xxxxxxxxxx>
> Cc: osalvador <osalvador@xxxxxxx>
> Cc: David Rientjes <rientjes@xxxxxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: David Hildenbrand <david@xxxxxxxxxx>
>
> --
>
> Changes since 20210618:
> * moved RCU part to the prev patch in series.
>
> Changes since 20210302:
> * remove duplicate synchronize_rcu()
> ---
> mm/migrate.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 89 insertions(+), 1 deletion(-)

LGTM. Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>



Best Regards,
Yan, Zi

Attachment: signature.asc
Description: OpenPGP digital signature