[PATCH v08 5/5] hotplug/pmt: Update topology after PMT

Michael Bringmann mwb at linux.vnet.ibm.com
Sun Jul 29 23:19:33 AEST 2018


hotplug/pmt: Invoke rebuild_sched_domains before applying any CPU
'readd' modifications.  The call leads to arch_update_cpu_topology()
which will recognize and report any changes to the CPU topology
are now applied, and that the relevant system data structures are
updated.  It may also initialize nodes that were unused in the
topology of the source migration system.  This will avoid some
locking synchronization issues that were observed during development
of this patch set.  Also, the addition of the explicit call ensures
that such changes are made even when the automatic topology update
worker, triggered by a timer, has been disabled.

Signed-off-by: Michael Bringmann <mwb at linux.vnet.ibm.com>
---
Changes in patch:
  -- Add information to description.
  -- Remove long ssleep calls
  -- Rearrange code to perform rebuild before any other PMT mods
---
 arch/powerpc/platforms/pseries/dlpar.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 13ac1cc..2de0f0d 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -16,6 +16,7 @@
 #include <linux/notifier.h>
 #include <linux/spinlock.h>
 #include <linux/cpu.h>
+#include <linux/cpuset.h>
 #include <linux/slab.h>
 #include <linux/of.h>
 
@@ -437,6 +438,17 @@ static int dlpar_pmt(struct pseries_hp_errorlog *work)
 {
 	struct list_head *pos, *q;
 
+	/* Rebuild the domains and init any memoryless nodes
+	 * first to avoid later sync issues with CPU readd.
+	 */
+	rebuild_sched_domains();
+	msleep(100);
+		/* Ensure that the worker for rebuild_sched_domains
+		 * has the opportunity to actually begin work as we
+		 * don't want it delayed by the CPU readd hotplug
+		 * locking.
+		 */
+
 	list_for_each_safe(pos, q, &dlpar_delayed_list) {
 		struct pseries_hp_errorlog *tmp;
 



More information about the Linuxppc-dev mailing list