All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: Michael Bringmann <mwb@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: John Allen <jallen@linux.vnet.ibm.com>,
	Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
	Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Subject: Re: [PATCH v07 6/9] pmt/numa: Disable arch_update_cpu_topology during CPU readd
Date: Tue, 24 Jul 2018 15:38:58 -0500	[thread overview]
Message-ID: <af12aba9-6fc2-40d8-477d-17348666bdea@linux.vnet.ibm.com> (raw)
In-Reply-To: <2c5645d4-2911-5e49-5e41-7966fb909142@linux.vnet.ibm.com>

On 07/13/2018 03:18 PM, Michael Bringmann wrote:
> 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 <mwb@linux.vnet.ibm.com>
> ---
>   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 <linux/sched.h>	/* for idle_task_exit */
>   #include <linux/sched/hotplug.h>
>   #include <linux/cpu.h>
> +#include <linux/cpuset.h>
>   #include <linux/of.h>
>   #include <linux/slab.h>
>   #include <asm/prom.h>
> @@ -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();
> +	}
> 

A couple of questions...Why not disable across the entire remove and add
operations instead of disabling for each operation?

Also, what about other CPU add/remove routines, do they need to do
similar disabling?

-Nathan

>   	if (rc)
>   		pr_info("Failed to update cpu at drc_index %lx\n",
> 

  reply	other threads:[~2018-07-24 20:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13 20:16 [PATCH v07 0/9] powerpc/hotplug: Update affinity for migrated CPUs Michael Bringmann
2018-07-13 20:17 ` [PATCH v07 1/9] hotplug/cpu: Conditionally acquire/release DRC index Michael Bringmann
2018-07-23 17:42   ` Nathan Fontenot
2018-07-13 20:18 ` [PATCH v07 2/9] hotplug/cpu: Add operation queuing function Michael Bringmann
2018-07-23 15:54   ` John Allen
2018-07-25 15:49     ` Michael Bringmann
2018-07-27  5:57       ` Michael Ellerman
2018-07-23 17:51   ` Nathan Fontenot
2018-07-25 15:57     ` Michael Bringmann
2018-07-27  6:09       ` Michael Ellerman
2018-07-13 20:18 ` [PATCH v07 3/9] hotplug/cpu: Provide CPU readd operation Michael Bringmann
2018-07-13 20:18 ` [PATCH v07 4/9] mobility/numa: Ensure numa update does not overlap Michael Bringmann
2018-07-13 20:18 ` [PATCH v07 5/9] numa: Disable/enable arch_update_cpu_topology Michael Bringmann
2018-07-13 20:18 ` [PATCH v07 6/9] pmt/numa: Disable arch_update_cpu_topology during CPU readd Michael Bringmann
2018-07-24 20:38   ` Nathan Fontenot [this message]
2018-07-13 20:18 ` [PATCH v07 7/9] powerpc/rtas: Allow disabling rtas_event_scan Michael Bringmann
2018-07-13 20:18 ` [PATCH v07 8/9] hotplug/rtas: No rtas_event_scan during PMT update Michael Bringmann
2018-07-13 20:18 ` [PATCH v07 9/9] hotplug/pmt: Update topology after PMT Michael Bringmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af12aba9-6fc2-40d8-477d-17348666bdea@linux.vnet.ibm.com \
    --to=nfont@linux.vnet.ibm.com \
    --cc=jallen@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mwb@linux.vnet.ibm.com \
    --cc=tlfalcon@linux.vnet.ibm.com \
    --cc=tyreld@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.