Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671589

Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd
Date 2017-06-21 12:20 +0200
Message-ID <tUKTT-4Pr-3@gated-at.bofh.it> (permalink)
References <tUzvs-5W2-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> writes:

> Calling arch_update_cpu_topology from a CPU hotplug state machine callback
> hits a deadlock because the function tries to get a read lock on
> cpu_hotplug_lock while the state machine still holds a write lock on it.
>
> Since all callers of arch_update_cpu_topology except rtasd already hold
> cpu_hotplug_lock, this patch changes the function to use
> stop_machine_cpuslocked and creates a separate function for rtasd which
> still tries to obtain the lock.
>
> Michael Bringmann investigated the bug and provided a detailed analysis
> of the deadlock on this previous RFC for an alternate solution:
>
> https://patchwork.ozlabs.org/patch/771293/

Do we know when this broke? Or has it never worked?

Should it go to stable? (can't in its current form AFAICS)

> Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
> ---
>
> Notes:
>     This patch applies on tip/smp/hotplug, it should probably be carried there.

stop_machine_cpuslocked() doesn't exist in mainline so I think it has to
be carried there right?

cheers

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-21 00:10 +0200
  Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd Michael Ellerman <mpe@ellerman.id.au> - 2017-06-21 12:20 +0200
    Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-22 03:20 +0200
      Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by  rtasd Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 14:30 +0200
      Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd Michael Ellerman <mpe@ellerman.id.au> - 2017-06-22 15:10 +0200
        Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-06-22 21:40 +0200
          Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by  rtasd Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 23:50 +0200
            Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd Michael Ellerman <mpe@ellerman.id.au> - 2017-06-23 06:20 +0200
  [tip:smp/hotplug] powerpc: Only obtain cpu_hotplug_lock if called  by rtasd tip-bot for Thiago Jung Bauermann <tipbot@zytor.com> - 2017-06-23 09:40 +0200

csiph-web