From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41S3z13MzfzF35v for ; Sat, 14 Jul 2018 06:18:21 +1000 (AEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6DKFw56124449 for ; Fri, 13 Jul 2018 16:18:18 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0b-001b2d01.pphosted.com with ESMTP id 2k723129vf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 13 Jul 2018 16:18:18 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Jul 2018 16:18:18 -0400 From: Michael Bringmann Subject: [PATCH v07 6/9] pmt/numa: Disable arch_update_cpu_topology during CPU readd Cc: Michael Bringmann , Nathan Fontenot , John Allen , Tyrel Datwyler , Thomas Falcon To: linuxppc-dev@lists.ozlabs.org In-Reply-To: <458ff569-f611-f506-afa1-138146551dde@linux.vnet.ibm.com> Date: Fri, 13 Jul 2018 15:18:14 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Message-Id: <2c5645d4-2911-5e49-5e41-7966fb909142@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , pmt/numa: Disable arch_update_cpu_topology during post migration CPU readd updates when evaluating device-tree changes after LPM to avoid thread deadlocks trying to update node assignments. System timing between all of the threads and timers restarted in a migrated system overlapped frequently allowing tasks to start acquiring resources (get_online_cpus) needed by rebuild_sched_domains. Defer the operation of that function until after the CPU readd has completed. Signed-off-by: Michael Bringmann --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 1906ee57..df1791b 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -26,6 +26,7 @@ #include /* for idle_task_exit */ #include #include +#include #include #include #include @@ -684,9 +685,15 @@ static int dlpar_cpu_readd_by_index(u32 drc_index) pr_info("Attempting to re-add CPU, drc index %x\n", drc_index); + arch_update_cpu_topology_suspend(); rc = dlpar_cpu_remove_by_index(drc_index, false); - if (!rc) + arch_update_cpu_topology_resume(); + + if (!rc) { + arch_update_cpu_topology_suspend(); rc = dlpar_cpu_add(drc_index, false); + arch_update_cpu_topology_resume(); + } if (rc) pr_info("Failed to update cpu at drc_index %lx\n",