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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 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 72ACFC352A3 for ; Tue, 11 Feb 2020 14:10:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 524C7214DB for ; Tue, 11 Feb 2020 14:10:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729567AbgBKOKQ (ORCPT ); Tue, 11 Feb 2020 09:10:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:56784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728124AbgBKOKQ (ORCPT ); Tue, 11 Feb 2020 09:10:16 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 DA16620675; Tue, 11 Feb 2020 14:10:14 +0000 (UTC) Date: Tue, 11 Feb 2020 09:10:13 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: Mathieu Desnoyers , linux-kernel , Ingo Molnar , "Joel Fernandes, Google" , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Thomas Gleixner , paulmck , Josh Triplett , Lai Jiangshan Subject: Re: [PATCH] tracing/perf: Move rcu_irq_enter/exit_irqson() to perf trace point hook Message-ID: <20200211091013.0eec4cda@gandalf.local.home> In-Reply-To: <20200211120015.GL14914@hirez.programming.kicks-ass.net> References: <20200210170643.3544795d@gandalf.local.home> <576504045.617212.1581381032132.JavaMail.zimbra@efficios.com> <20200211120015.GL14914@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Feb 2020 13:00:15 +0100 Peter Zijlstra wrote: > As per nmi_enter() calling rcu_nmi_enter() I've always assumed that NMIs > are fully covered by RCU. > > If this isn't so, RCU it terminally broken :-) Most of the time it is. But for tracing that injects callbacks at arbitrary points of code, it can break. I've always said that tracing is a more sensitive context than NMI itself. The reason NMIs are sensitive is because they can happen pretty much anywhere. But tracing can happen also in the context switch that enters NMI. This is why function tracing does the "rude" RCU flavor (yes Paul, I'd love you to add that flavor!), that performs a schedule_on_each_cpu() before freeing anything. Because it traces when RCU is not watching. But RCU really shouldn't have to bend over backward for tracing, as tracing is the exception and not the norm. -- Steve