author: Huang Ying <ying.huang@intel.com> 2021-10-18 15:15:35 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-10-18 20:22:03 -1000
commit: a6a0251c6fce496744121b4e08c899f45270dbcc
parent: 76af6a054da4055305ddb28c5eb151b9ee4f74f9
Commit Summary:
Diffstat:
1 file changed, 5 insertions, 3 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 700112c0123d..1852d787e6ab 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -3288,9 +3288,8 @@ static int __init migrate_on_reclaim_init(void)
{
int ret;
- ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "migrate on reclaim",
- migration_online_cpu,
- migration_offline_cpu);
+ ret = cpuhp_setup_state_nocalls(CPUHP_MM_DEMOTION_DEAD, "mm/demotion:offline",
+ NULL, migration_offline_cpu);
/*
* In the unlikely case that this fails, the automatic
* migration targets may become suboptimal for nodes
@@ -3298,6 +3297,9 @@ static int __init migrate_on_reclaim_init(void)
* rare case, do not bother trying to do anything special.
*/
WARN_ON(ret < 0);
+ ret = cpuhp_setup_state(CPUHP_AP_MM_DEMOTION_ONLINE, "mm/demotion:online",
+ migration_online_cpu, NULL);
+ WARN_ON(ret < 0);
hotplug_memory_notifier(migrate_on_reclaim_callback, 100);
return 0;