Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp853973pxb; Thu, 5 Nov 2020 15:04:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJztgBfEMAMExotoWvrGvfKho3DP0agfaHAiMrBZrmppEVFbyyy0LgLHHsPgI8NXgomWqyTR X-Received: by 2002:a17:906:c1c3:: with SMTP id bw3mr4504650ejb.126.1604617482743; Thu, 05 Nov 2020 15:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604617482; cv=none; d=google.com; s=arc-20160816; b=X/e9xsFn50chqA0Y+E+6cAQjKQX/poT07xpIMIH5/sc804hmXuLmHEn8Niz3J8GGfy KQ1Ns35a3AHMq3yXkt2bwC6JAy/AjSD/0OcHUivL6A7lrbeV7aHhQhAxFKqJt47NieOa 9hbxdrQAOaVRso9Ql7h6F2qct5Wf4bDdWPx7Gr+zDVP4ggNn/pYmNLrLlk39HLJDzr9f T3stIu1WMPEU9l9mfya80JQ0PXzlGFRS7Ojqf+s9plBywgeDg5uxx+T/3uy3yfD0UATN OURR1wIfMeebd1AHj8MFZmKJMeKDSG43UAAqiszyQfAZvGFB7xk0hoVVU08+T9Qxmyiz bC8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=JnHZYUF/teL6IX1yin+oJWg9fIjSJKlhuSAPesf84sw=; b=agjhr7sS+MjgRqMkGKXV7WvuSFvvFOFVdl12c5KownBOB2b3aiETzpn9x462mxzSEe ceIOQfPLr65fmicsRAhgkBNhkH/lAOLZtmAJDY70kKuqGP0xYZlXrbaEJBflMEFXO8AK JBZ7ot3YbW1bEpXofaIC7ybMn5T077S+x48sVaDNj0BNW4+Q+i8Q4FTN6hwY14fc9oV2 I+xJNWWeEz7E+wzvm5Lx+WaFHLBbHa5LPpWPVEPGSb8pKoDNAm25GEeMWXv2MY9BC/EU Df53uYTJ0uj62gUN78bMaqwKJSy4A9uVX4rfRKm3qpZZqH0hR2LpdncbJH/FfHhstL/Y JWGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Yh0a9Cgk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si2164316ejh.230.2020.11.05.15.04.19; Thu, 05 Nov 2020 15:04:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Yh0a9Cgk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732414AbgKEXC5 (ORCPT + 99 others); Thu, 5 Nov 2020 18:02:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:20300 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731899AbgKEXC5 (ORCPT ); Thu, 5 Nov 2020 18:02:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604617376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JnHZYUF/teL6IX1yin+oJWg9fIjSJKlhuSAPesf84sw=; b=Yh0a9Cgk7GeqyaoauE9JBGwjf588Nr4lkRlr/t/pEymITO7ed0nEz2RueY3vd6vhmsmcTC 0u/cT95zTjJP6CPR4EThR8sl2frt+NSk0gukkiwrq0YOmY9XGD3RgHxmCNTbUIkkLiY56R o3Gwm0eLc6HvF8NFfBpjv0dNX+R4UIc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-592-IDS3vivjNVanTsHcHtjzIg-1; Thu, 05 Nov 2020 18:02:52 -0500 X-MC-Unique: IDS3vivjNVanTsHcHtjzIg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 09DFD6D242; Thu, 5 Nov 2020 23:02:51 +0000 (UTC) Received: from ovpn-114-171.rdu2.redhat.com (ovpn-114-171.rdu2.redhat.com [10.10.114.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46A0C6198D; Thu, 5 Nov 2020 23:02:50 +0000 (UTC) Message-ID: <3b4c324abdabd12d7bd5346c18411e667afe6a55.camel@redhat.com> Subject: Re: [PATCH] arm64/smp: Move rcu_cpu_starting() earlier From: Qian Cai To: Will Deacon , "Paul E. McKenney" Cc: catalin.marinas@arm.com, kernel-team@android.com, Peter Zijlstra , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Thu, 05 Nov 2020 18:02:49 -0500 In-Reply-To: <20201105222242.GA8842@willie-the-truck> References: <20201028182614.13655-1-cai@redhat.com> <160404559895.1777248.8248643695413627642.b4-ty@kernel.org> <20201105222242.GA8842@willie-the-truck> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-11-05 at 22:22 +0000, Will Deacon wrote: > On Fri, Oct 30, 2020 at 04:33:25PM +0000, Will Deacon wrote: > > On Wed, 28 Oct 2020 14:26:14 -0400, Qian Cai wrote: > > > The call to rcu_cpu_starting() in secondary_start_kernel() is not early > > > enough in the CPU-hotplug onlining process, which results in lockdep > > > splats as follows: > > > > > > WARNING: suspicious RCU usage > > > ----------------------------- > > > kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!! > > > > > > [...] > > > > Applied to arm64 (for-next/fixes), thanks! > > > > [1/1] arm64/smp: Move rcu_cpu_starting() earlier > > https://git.kernel.org/arm64/c/ce3d31ad3cac > > Hmm, this patch has caused a regression in the case that we fail to > online a CPU because it has incompatible CPU features and so we park it > in cpu_die_early(). We now get an endless spew of RCU stalls because the > core will never come online, but is being tracked by RCU. So I'm tempted > to revert this and live with the lockdep warning while we figure out a > proper fix. > > What's the correct say to undo rcu_cpu_starting(), given that we cannot > invoke the full hotplug machinery here? Is it correct to call > rcutree_dying_cpu() on the bad CPU and then rcutree_dead_cpu() from the > CPU doing cpu_up(), or should we do something else? It looks to me that rcu_report_dead() does the opposite of rcu_cpu_starting(), so lift rcu_report_dead() out of CONFIG_HOTPLUG_CPU and use it there to rewind, Paul?