Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbdFUKKX (ORCPT ); Wed, 21 Jun 2017 06:10:23 -0400 Received: from ozlabs.org ([103.22.144.67]:41935 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751994AbdFUKKV (ORCPT ); Wed, 21 Jun 2017 06:10:21 -0400 From: Michael Ellerman To: Thiago Jung Bauermann , linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, John Allen , Michael Bringmann , Thiago Jung Bauermann , Nathan Fontenot , Thomas Gleixner Subject: Re: [PATCH] powerpc: Only obtain cpu_hotplug_lock if called by rtasd In-Reply-To: <1497996510-4032-1-git-send-email-bauerman@linux.vnet.ibm.com> References: <1497996510-4032-1-git-send-email-bauerman@linux.vnet.ibm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Wed, 21 Jun 2017 20:10:18 +1000 Message-ID: <8737attzw5.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1100 Lines: 30 Thiago Jung Bauermann 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 > --- > > 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