From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9DA1C2D0A3 for ; Fri, 6 Nov 2020 14:43:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 432AA20724 for ; Fri, 6 Nov 2020 14:43:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zuQZfa5D"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="WVaTpqyz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 432AA20724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:Reply-To:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+rnS9rQNcjIwDl+ZrNIqCtP4gGbt9gRUPhSqun05hpg=; b=zuQZfa5DrDvl+8VkxRmW3E9j3e qp+GInNXQ0dw1gVc4dR4KM6yrWxzTSl1CXqPUw55vUJPDCRVgylc8mXM86HRNr2uQEmORV2Xev9p0 LbDrzHJIDF0L/ISulk3UQhJI5B2XqylYiWFRKqzkCnr2M2hjwfNV5ZttPrzhUhX/+pX9mtWg3w0RE eepALS+JV6Wl1J1EFefNpJEpFppn2c/1y8+tRRKt9xQ4dzjAZ/sH0R8suhZVnZ/LYPrMv1NsLBzrA HdV5mxPa2eISJG9eL/G9qKHScXEWzDhnXHeiv68GCXNoY3+9Gv4vPbTfoqagkxYJZOsHaB6eXCN0j GdNeGeiA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb2xQ-00070g-1c; Fri, 06 Nov 2020 14:43:16 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb2xO-00070C-0m for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 14:43:14 +0000 Received: from paulmck-ThinkPad-P72.home (50-39-104-11.bvtn.or.frontiernet.net [50.39.104.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1DF4A20724; Fri, 6 Nov 2020 14:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604673793; bh=Fj8awA6Fcy8YY7k4CfGwBYzsc5wO+RhyNYKCMKn+Tgw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=WVaTpqyzRDjE84irSOloXbMBATmZDFNKMDSBKQd6owGZ6BzV6xpSBKGSHmFv1dwuz IlGycO1W8Of5jO850yWfaG4HRtUWnmlYwtSOffGtdlAjqdctCeNhHF/nAPkClaWDuO 4+pTL5/ZfaiDit4KSZ1J7qqm4vua8OmPqb6Gw0HU= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id AB157352097B; Fri, 6 Nov 2020 06:43:12 -0800 (PST) Date: Fri, 6 Nov 2020 06:43:12 -0800 From: "Paul E. McKenney" To: Will Deacon Subject: Re: [PATCH 2/2] arm64: smp: Tell RCU about CPUs that fail to come online Message-ID: <20201106144312.GU3249@paulmck-ThinkPad-P72> References: <20201106103602.9849-1-will@kernel.org> <20201106103602.9849-3-will@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201106103602.9849-3-will@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_094314_234805_7B5C5D1C X-CRM114-Status: GOOD ( 23.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: paulmck@kernel.org Cc: Qian Cai , Catalin Marinas , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 06, 2020 at 10:36:02AM +0000, Will Deacon wrote: > Commit ce3d31ad3cac ("arm64/smp: Move rcu_cpu_starting() earlier") ensured > that RCU is informed early about incoming CPUs that might end up calling > into printk() before they are online. However, if such a CPU fails the > early CPU feature compatibility checks in check_local_cpu_capabilities(), > then it will be powered off or parked without informing RCU, leading to > an endless stream of stalls: > > | rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: > | rcu: 2-O...: (0 ticks this GP) idle=002/1/0x4000000000000000 softirq=0/0 fqs=2593 > | (detected by 0, t=5252 jiffies, g=9317, q=136) > | Task dump for CPU 2: > | task:swapper/2 state:R running task stack: 0 pid: 0 ppid: 1 flags:0x00000028 > | Call trace: > | ret_from_fork+0x0/0x30 > > Ensure that the dying CPU invokes rcu_report_dead() prior to being powered > off or parked. > > Cc: Qian Cai > Cc: "Paul E. McKenney" > Suggested-by: Qian Cai > Signed-off-by: Will Deacon Reviewed-by: Paul E. McKenney > --- > arch/arm64/kernel/smp.c | 1 + > kernel/rcu/tree.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index 09c96f57818c..18e9727d3f64 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -413,6 +413,7 @@ void cpu_die_early(void) > > /* Mark this CPU absent */ > set_cpu_present(cpu, 0); > + rcu_report_dead(cpu); > > if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) { > update_cpu_boot_status(CPU_KILL_ME); > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 2a52f42f64b6..bd04b09b84b3 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -4077,7 +4077,6 @@ void rcu_cpu_starting(unsigned int cpu) > smp_mb(); /* Ensure RCU read-side usage follows above initialization. */ > } > > -#ifdef CONFIG_HOTPLUG_CPU > /* > * The outgoing function has no further need of RCU, so remove it from > * the rcu_node tree's ->qsmaskinitnext bit masks. > @@ -4117,6 +4116,7 @@ void rcu_report_dead(unsigned int cpu) > rdp->cpu_started = false; > } > > +#ifdef CONFIG_HOTPLUG_CPU > /* > * The outgoing CPU has just passed through the dying-idle state, and we > * are being invoked from the CPU that was IPIed to continue the offline > -- > 2.29.1.341.ge80a0c044ae-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel