+ mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3
has been added to the -mm tree.  Its filename is
     mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Oscar Salvador <osalvador@xxxxxxx>
Subject: mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3

add feedback from Huang Ying

Link: https://lkml.kernel.org/r/20220314150945.12694-1-osalvador@xxxxxxx
Fixes: 884a6e5d1f93b ("mm/migrate: update node demotion order on hotplug events")
Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
Tested-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
Reported-by: Abhishek Goel <huntbag@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/migrate.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/mm/migrate.c~mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3
+++ a/mm/migrate.c
@@ -3280,12 +3280,16 @@ void __init migrate_on_reclaim_init(void
 				      GFP_KERNEL);
 	WARN_ON(!node_demotion);
 
+	hotplug_memory_notifier(migrate_on_reclaim_callback, 100);
 	/*
 	 * At this point, all numa nodes with memory/CPus have their state
 	 * properly set, so we can build the demotion order now.
+	 * Let us hold the cpu_hotplug lock just, as we could possibily have
+	 * CPU hotplug events during boot.
 	 */
+	cpus_read_lock();
 	set_migration_target_nodes();
-	hotplug_memory_notifier(migrate_on_reclaim_callback, 100);
+	cpus_read_unlock();
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
_

Patches currently in -mm which might be from osalvador@xxxxxxx are

arch-x86-mm-numa-do-not-initialize-nodes-twice.patch
arch-x86-mm-numa-do-not-initialize-nodes-twice-v2.patch
mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state.patch
mm-only-re-generate-demotion-targets-when-a-numa-node-changes-its-n_cpu-state-v3.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux