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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 6BCFEC2D0A3 for ; Thu, 29 Oct 2020 09:11:56 +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 DEBE8206D9 for ; Thu, 29 Oct 2020 09:11:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0pX3o4Wn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="pTmTYwKf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEBE8206D9 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:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xGy0r8DGM/oJt+iLj9HF4Caojx1AYbEcVe78PXpmG7E=; b=0pX3o4WnMaTMVyByL4sr4eSzk JiTKrV7YnJR5DRjR6xuK1ueqrSrQDBLBA6IVBvYceQEzVb5NtM+aIfGbXxYDVRFRl6zz5gp3kpoh4 xiskk7HM8H4N1ZAkBQ4CfB7Zqkve7s+jxw53+6iLEXsnSt9W/cKzhdbVD8UNSbgJQB+jvDi4xVwXq qgAgJfPlkCbiDwZ/czmRGgFh7zvdzoH4XIbvJEyqURZdcCG7gnVTGdgI1Biam1/lkCi2hVJYZQTDS NOkqY8Q1+31QxxGKb63RNnrrg8KyaTzwylMJ/IxjOTIXfwwZQvcHerFR6/QcwDYM67z9o2hAW7rjW sO4wwI70g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY3xN-0005BN-Ul; Thu, 29 Oct 2020 09:10:53 +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 1kY3xM-0005Aa-2p for linux-arm-kernel@lists.infradead.org; Thu, 29 Oct 2020 09:10:52 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 51EBB206D9; Thu, 29 Oct 2020 09:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603962650; bh=LtTLUdpxG7bjGsCM6IUA5h7OYDjxp2VftjxTgl41aaQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pTmTYwKfEOQppT2Du0O08zinNJTX6DnnIgxTAYMTG7gNuvzUOjxPWM8E0Ln9sYVMw VQb2ZQ3W9T8IL2IMgZlQ6K5aQ/9f6MNW/8p6TbLqQbX8BZA6gZTbUt9aDhId2iP3IR 3+I9ioMnRY4TUpvTHPP2MFHc2N+K/XJtuEDEq/lM= Date: Thu, 29 Oct 2020 09:10:45 +0000 From: Will Deacon To: Qian Cai Subject: Re: [PATCH] arm64/smp: Move rcu_cpu_starting() earlier Message-ID: <20201029091045.GA29890@willie-the-truck> References: <20201028182614.13655-1-cai@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201028182614.13655-1-cai@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201029_051052_234997_C7798F62 X-CRM114-Status: GOOD ( 14.85 ) 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: , Cc: Peter Zijlstra , Catalin Marinas , linux-arm-kernel@lists.infradead.org, "Paul E. McKenney" , linux-kernel@vger.kernel.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 Wed, Oct 28, 2020 at 02:26:14PM -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!! > > other info that might help us debug this: > > RCU used illegally from offline CPU! > rcu_scheduler_active = 1, debug_locks = 1 > no locks held by swapper/1/0. > > Call trace: > dump_backtrace+0x0/0x3c8 > show_stack+0x14/0x60 > dump_stack+0x14c/0x1c4 > lockdep_rcu_suspicious+0x134/0x14c > __lock_acquire+0x1c30/0x2600 > lock_acquire+0x274/0xc48 > _raw_spin_lock+0xc8/0x140 > vprintk_emit+0x90/0x3d0 > vprintk_default+0x34/0x40 > vprintk_func+0x378/0x590 > printk+0xa8/0xd4 > __cpuinfo_store_cpu+0x71c/0x868 > cpuinfo_store_cpu+0x2c/0xc8 > secondary_start_kernel+0x244/0x318 > > This is avoided by moving the call to rcu_cpu_starting up near the > beginning of the secondary_start_kernel() function. Hmm, it's not really a move though -- we'll end up calling this thing twice afaict. It would be better to make sure we've called notify_cpu_starting() early enough. Can we do that instead? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel