Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp251743pxa; Thu, 27 Aug 2020 00:54:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUaqaD81qRR9tv9h3npSchxb3IRtI6s9VXQbAd2Dkzwec2Xv7QUrgncXV8mS4v/v26qYLQ X-Received: by 2002:a17:906:84c1:: with SMTP id f1mr19390114ejy.494.1598514865527; Thu, 27 Aug 2020 00:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598514865; cv=none; d=google.com; s=arc-20160816; b=I4C08y/Qc7qL03N75wTbGmt8vGxO2rexz/3l9iTqcNFtJS1HdNFzfM0bqbyomX24JM CwQTERMURo8yS72diCYyI2JXjfPAAOaNFkFYd917zdipm1lyhrwxoqRQ0U5KUCQboxZB kWwiONw5waBac4v5cBwh+0SEpnn9DMJYKqkgXi5JJbVIR36/5b5z+G0vNDZ5b1oIAruu i4xgrrI3nM9KsNruVkfet58A1yM9mll8ycvqJpOkxDIXoG8LgKW0Tz4auoGA70Jh+PA8 vh9XHQKzky0q5wskaWoW+DrTY3c6SlYYj4GCukHPduiz4mNLNTbIgzdccyqZBpEAeyTZ ZLDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=yzbJxJmvrprBUBklV/gmOhK78hj3XpUYafHb2YG97No=; b=EPKUC4znR23Ns6ZEk35sClwLlS7svShaHjKr2dJRUhddxA37eAD3QEjl5sLieE2g1D /GZhnTEJytBuL0WORK3sjfL05tuR81WbdSwLcBPeZIwQaMt877fj9zga6U+XKpL/NWsW C9T4QgczXTAhI0f75FQfcNA7e8niR89raHLq7IHu6muk3GxyiF/omFJlJkJZiRt7+XYf PTLQ1YW+9THeRpJlxqMfACqtDCJx71FLZ8HdoSLirtVrABYnDfe3lD/2KeoF/9UcMZpY OdiK5dZlVjdJTRpCsc9cmNp3V5JRfhBR/EBAVcxktd+3UWF7Ye3Mhn6ME+obA6OcJtRG cmgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rxpZxBFK; dkim=neutral (no key) header.i=@vger.kernel.org header.b="YtH6D4l/"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l14si1103903edv.544.2020.08.27.00.54.02; Thu, 27 Aug 2020 00:54:25 -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=@linutronix.de header.s=2020 header.b=rxpZxBFK; dkim=neutral (no key) header.i=@vger.kernel.org header.b="YtH6D4l/"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726882AbgH0HxZ (ORCPT + 99 others); Thu, 27 Aug 2020 03:53:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727030AbgH0HxZ (ORCPT ); Thu, 27 Aug 2020 03:53:25 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12AFAC061264 for ; Thu, 27 Aug 2020 00:53:23 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598514801; 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: in-reply-to:in-reply-to:references:references; bh=yzbJxJmvrprBUBklV/gmOhK78hj3XpUYafHb2YG97No=; b=rxpZxBFKoKj+7Fh3b/AWNDpwKTthubAQ8q2pSGRnwFsPW0EUuJGtqWrJWf72fARfB/teOJ vr+uELb5c0rVzGckI6HPLqtgGGVsUdsDke6+0VhecbLlXz8fT3l7gH3cgD1jSWdiCMAY1f pYkSo0btl2WsKAlmEpkSt8AR9JTNzc81cVwrLvz29WTywncaxChQqWZy27ofiLpmonZK5X GrYqPUx5II/QkZJbjSSOoYxiRwUZMDRltWBC/3M+sITrPqWV7kthKWT913xMS1ie6VzmL/ qxv26ydSAOdipxmzNzAFAZ3Rz7IAMuIuFeS6yMPMoHrHrZGk89wD+7rPiND22A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598514801; 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: in-reply-to:in-reply-to:references:references; bh=yzbJxJmvrprBUBklV/gmOhK78hj3XpUYafHb2YG97No=; b=YtH6D4l/oWSejMNR88grPMD9UqLNZuxPohmv+wCs6HOLo+etceyzggsd+uzgy7M6xl1Xlw UpxuecIB3+Fvq9Bg== To: peterz@infradead.org, Joel Fernandes Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, will@kernel.org, npiggin@gmail.com, elver@google.com, jgross@suse.com, paulmck@kernel.org, rostedt@goodmis.org, rjw@rjwysocki.net, svens@linux.ibm.com Subject: Re: [PATCH v2 03/11] sched,idle,rcu: Push rcu_idle deeper into the idle path In-Reply-To: <20200827074748.GY2674@hirez.programming.kicks-ass.net> References: <20200821084738.508092956@infradead.org> <20200821085348.310943801@infradead.org> <20200827011826.GA1942571@google.com> <20200827012419.GB1942571@google.com> <20200827074748.GY2674@hirez.programming.kicks-ass.net> Date: Thu, 27 Aug 2020 09:53:20 +0200 Message-ID: <875z94le33.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27 2020 at 09:47, peterz wrote: > On Wed, Aug 26, 2020 at 09:24:19PM -0400, Joel Fernandes wrote: >> On Wed, Aug 26, 2020 at 09:18:26PM -0400, Joel Fernandes wrote: >> > On Fri, Aug 21, 2020 at 10:47:41AM +0200, Peter Zijlstra wrote: >> > > Lots of things take locks, due to a wee bug, rcu_lockdep didn't notice >> > > that the locking tracepoints were using RCU. >> > > >> > > Push rcu_idle_{enter,exit}() as deep as possible into the idle paths, >> > > this also resolves a lot of _rcuidle()/RCU_NONIDLE() usage. >> > > >> > > Specifically, sched_clock_idle_wakeup_event() will use ktime which >> > > will use seqlocks which will tickle lockdep, and >> > > stop_critical_timings() uses lock. >> > >> > I was wondering if those tracepoints should just use _rcuidle variant of the >> > trace call. But that's a terrible idea considering that would add unwanted >> > overhead I think. >> > >> > Reviewed-by: Joel Fernandes (Google) >> >> BTW, if tracepoint is converted to use RCU-trace flavor, then these kinds of >> issues go away, no? That RCU flavor is always watching. > > All trace_*_rcuidle() and RCU_NONIDLE() usage is a bug IMO. It's the same problem as low level entry/exit. And that stuff is a hack which papers over the problem instead of fixing it from ground up. But we are talking about tracing, right? Thanks, tglx