From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752761AbdLLRiT (ORCPT ); Tue, 12 Dec 2017 12:38:19 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:44918 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752546AbdLLRiL (ORCPT ); Tue, 12 Dec 2017 12:38:11 -0500 Date: Tue, 12 Dec 2017 17:37:59 +0000 From: Russell King - ARM Linux To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan , Fabio Estevam , Ingo Molnar , "Peter Zijlstra (Intel)" , Michal Hocko , Thomas Gleixner Subject: Re: [PATCH] ARM: CPU hotplug: Delegate complete() to surviving CPU Message-ID: <20171212173759.GE10595@n2100.armlinux.org.uk> References: <20171212172059.GA11875@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171212172059.GA11875@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 12, 2017 at 09:20:59AM -0800, Paul E. McKenney wrote: > The ARM implementation of arch_cpu_idle_dead() invokes complete(), but > does so after RCU has stopped watching the outgoing CPU, which results > in lockdep complaints because complete() invokes functions containing RCU > readers. This patch therefore uses Thomas Gleixner's trick of delegating > the complete() call to a surviving CPU via smp_call_function_single(). > > Reported-by: Peng Fan > Reported-by: Russell King - ARM Linux > Signed-off-by: Paul E. McKenney > Tested-by: Tested-by: Fabio Estevam > Cc: Russell King > Cc: Ingo Molnar > Cc: "Peter Zijlstra (Intel)" > Cc: Michal Hocko > Cc: Thomas Gleixner > Cc: As I just described in response to Fabio's testing, this doesn't solve anything if CONFIG_BL_SWITCHER is enabled. We could lose the unlock of a spinlock in the GIC code for sending the IPI. As I already said previously in our discussion (but I guess you just don't believe me): "2. there's some optional locking in the GIC driver that cause problems for the cpu dying path. The concensus last time around was that the IPI solution is a non- starter, so the seven year proven-reliable solution (disregarding the RCU warning) persists because I don't think anyone came up with a better solution." Using smp_call_function_single() invokes the IPI paths. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up