Re: [PATCH] mm/migrate: fix CPUHP state to update node demotion order

From: Thomas Gleixner
Date: Mon Sep 20 2021 - 03:03:15 EST


On Sat, Sep 18 2021 at 10:58, Huang Ying wrote:
> @@ -72,6 +72,7 @@ enum cpuhp_state {
> CPUHP_SLUB_DEAD,
> CPUHP_DEBUG_OBJ_DEAD,
> CPUHP_MM_WRITEBACK_DEAD,
> + CPUHP_MM_DEMOTION_OFFLINE,

Please keep the _DEAD convention in that section. The plugged CPU is
already gone.

> CPUHP_MM_VMSTAT_DEAD,
> CPUHP_SOFTIRQ_DEAD,
> CPUHP_NET_MVNETA_DEAD,
> @@ -240,6 +241,7 @@ enum cpuhp_state {
> CPUHP_AP_BASE_CACHEINFO_ONLINE,
> CPUHP_AP_ONLINE_DYN,
> CPUHP_AP_ONLINE_DYN_END = CPUHP_AP_ONLINE_DYN + 30,
> + CPUHP_AP_MM_DEMOTION_ONLINE,

Are there any ordering requirements of these states vs. other CPU
hotplug states?

If not, then please use the dynamically allocated states.

If so, then please add a comment:

+ /* Must be before CPUHP_XXX and after CPUHP_YYY */
+ CPUHP_MM_DEMOTION_OFFLINE,

Thanks,

tglx