Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2156787pxu; Fri, 9 Oct 2020 09:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyGIwRGN7m44qtpqALBDsk0IeZOdprl/2DuP96VWE1aR2gqQpo1tm4JqZSwmTx1KcXu88h X-Received: by 2002:a17:906:c1c3:: with SMTP id bw3mr14790392ejb.516.1602260108494; Fri, 09 Oct 2020 09:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602260108; cv=none; d=google.com; s=arc-20160816; b=rFAsngJTy5ye9umNMbKafJhXKDVgMCV62BkUjhTXIHy2RwJR5jykNQWbxlocKkrLnh +Ug6Pf+CM5uvXa6YrgA7nemSEm1L9+ZRkAiizgV74uV9RtZb9Y2SpILHthqVVBkwAl4x P6yc0fzPQ6e4sEFHKgKtt8SwkZ2cxB66A38SM4679IChRKAqjQmvJVkNEu4ZWzsHiqL5 reuDV8lDXB2tciJhL0W9GlH+6zj+55qcwrKdwXEgfZctdSl4lamjJjMlM4Y2EIZc3eGJ UEDnuK/6VGwdRkRYp/C680enH4JeloFqsOWcmdADyp7oHw1xkV1oEGohbThMuZKmnuJz 5VGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=S/iLPN1c14L/IDgQ4T3vvDXvbeIgVixraTfrSMWAMZw=; b=KOigTd8EV1VaNtS7NmtAYKv+on/rYW7iLODKj8FGN0ZXWST+PqoAZ4MFpgRXLuFUTL uYXwDefBdqJjjYzScPyAm73NvGcZeKvKvbFhZzzhKtLUZcQ282MC/a2mruMRtXHLyhFx 3ycAQYyXGID12AXQGivJ0J2g4gP2Z+SwurK6jila3qmh+BNJH8c3iMretW4xyEOIZ06f GadVOkrG5OvQwTHscnrIYCa6HAEffREIEIBli/Sm6TTV8K2vWClreijGH3BwzQTqQ2XR WjH/cFov+ayThAp29c4UGXKaarPvnL7DzOlFd32FWPC5q2TYmEd7fg6IbwAJYNuQh9LI yIcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I971vGyp; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj16si5858519edb.110.2020.10.09.09.14.44; Fri, 09 Oct 2020 09:15:08 -0700 (PDT) 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=@kernel.org header.s=default header.b=I971vGyp; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389544AbgJIQLM (ORCPT + 99 others); Fri, 9 Oct 2020 12:11:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:54168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389451AbgJIQLM (ORCPT ); Fri, 9 Oct 2020 12:11:12 -0400 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 DD8CA2225D; Fri, 9 Oct 2020 16:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602259871; bh=PMuAxNhk0IlV+HpLBxx1Gu7eGebDilISmrDCshwbfVg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=I971vGypKo0oDlS4tk2IjPRyAVS9CFUuQrmlyNfFkYmYCD2OdK7tTEzKNzRI9DSfu iHSfOKjDDYav/BGqR1L+N40cYi8kic0yygcZ0S6sJdWjs+gefePDDDc2/huvtE4SFb dm9UXR2JQgmc5REIQmeF3LLjWmtxWa3NX0clHotc= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 9123B35227D5; Fri, 9 Oct 2020 09:11:11 -0700 (PDT) Date: Fri, 9 Oct 2020 09:11:11 -0700 From: "Paul E. McKenney" To: Qian Cai Cc: "Peter Zijlstra (Intel)" , Steven Rostedt , Ingo Molnar , x86 , linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Linux Next Mailing List , Stephen Rothwell , Boqun Feng Subject: Re: [tip: locking/core] lockdep: Fix lockdep recursion Message-ID: <20201009161111.GH29330@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <160223032121.7002.1269740091547117869.tip-bot2@tip-bot2> <20201009135837.GD29330@paulmck-ThinkPad-P72> <07fffca72fdd585a96ab8c45761c1ea223dc24f2.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07fffca72fdd585a96ab8c45761c1ea223dc24f2.camel@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 11:30:38AM -0400, Qian Cai wrote: > On Fri, 2020-10-09 at 06:58 -0700, Paul E. McKenney wrote: > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > > On Fri, 2020-10-09 at 07:58 +0000, tip-bot2 for Peter Zijlstra wrote: > > > > The following commit has been merged into the locking/core branch of tip: > > > > > > > > Commit-ID: 4d004099a668c41522242aa146a38cc4eb59cb1e > > > > Gitweb: > > > > https://git.kernel.org/tip/4d004099a668c41522242aa146a38cc4eb59cb1e > > > > Author: Peter Zijlstra > > > > AuthorDate: Fri, 02 Oct 2020 11:04:21 +02:00 > > > > Committer: Ingo Molnar > > > > CommitterDate: Fri, 09 Oct 2020 08:53:30 +02:00 > > > > > > > > lockdep: Fix lockdep recursion > > > > > > > > Steve reported that lockdep_assert*irq*(), when nested inside lockdep > > > > itself, will trigger a false-positive. > > > > > > > > One example is the stack-trace code, as called from inside lockdep, > > > > triggering tracing, which in turn calls RCU, which then uses > > > > lockdep_assert_irqs_disabled(). > > > > > > > > Fixes: a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per- > > > > cpu > > > > variables") > > > > Reported-by: Steven Rostedt > > > > Signed-off-by: Peter Zijlstra (Intel) > > > > Signed-off-by: Ingo Molnar > > > > > > Reverting this linux-next commit fixed booting RCU-list warnings everywhere. > > > > Is it possible that the RCU-list warnings were being wrongly suppressed > > without a21ee6055c30? As in are you certain that these RCU-list warnings > > are in fact false positives? > > I guess you mean this commit a046a86082cc ("lockdep: Fix lockdep recursion") > instead of a21ee6055c30. It is unclear to me how that commit a046a86082cc would > suddenly start to generate those warnings, although I can see it starts to use > percpu variables even though the CPU is not yet set online. > > DECLARE_PER_CPU(unsigned int, lockdep_recursion); > > Anyway, the problem is that when we in the early boot: > > start_secondary() > smp_init_secondary() > init_cpu_timer() > clockevents_register_device() > > We are taking a lock there but the CPU is not yet online, and the > __lock_acquire() would call things like hlist_for_each_entry_rcu() from > lookup_chain_cache() or register_lock_class(). Thus, triggering the RCU-list > from an offline CPU warnings. > > I am not entirely sure how to fix those though. One approach is to move the call to rcu_cpu_starting() earlier in the start_secondary() processing. It is OK to invoke rcu_cpu_starting() multiple times, so for experiemental purposes you should be able to add a new call to it just before that lock is acquired. Thanx, Paul