Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp190190imm; Tue, 7 Aug 2018 16:46:28 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyXPH5mqDtkb6ktc2KKFA0wKT0gvTA6iv6VgOf1MDIPlHoT9QKfIQ/T1THcDUbqYnF+zcoH X-Received: by 2002:a63:2263:: with SMTP id t35-v6mr367176pgm.272.1533685588234; Tue, 07 Aug 2018 16:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533685588; cv=none; d=google.com; s=arc-20160816; b=VW/NpCFd500kNKamC2Xpga3nYhD2No1lVF1deZvqL7h/s8R8HFpiQo66rcKj2OZQpM 6ye3A0OSVVX8nmJsU+8d2KuJ5s8GJL5vu7bGWXtTxR/6I3iuDQbPMC5T4IWnkN64zqSu KQVZSnYqNBvleKAhjyrXpc3JR6ETbL+7hK1pZHYTIuPh134oIM6dTeB71VsVbX9yP3Mg w8rp/AgQtoVBCveH89AIWNERK4YjP9FWboeWLVgNEsEYay22wJRrwQmY7kJmpMYf9GzA uRDqNdRDkf83hTC0o3Ylusl8GvONGQF3VQaO+9UQZwTfsPmI8XH++VGU0FPUnnEa0PXT hNkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=xCfR76pq51nJsr1bRSOPyfS2/YaetI3B8WH2udAnqDQ=; b=xZZWJVilvm7P7mgQCxp+t2VD0pAXOQEsH2eXII1VUiij+9lhrifUWnAmZbYLfEzzMh wVLkLOfAC593oiH3RzdTKIKTyjRoqbG1oFyOhivxW+tjt2JGxXrCZNBgP+jSHz4PGffC /Sk78p/iYml5WVq3RS31HbprzQ73oaZ3jRJNUxViLwyCtIJwk3c2vcV/ufBZsWGTinxG S78nrqy3a6hHe87VSVGHEYne1rcgihZmeVK8jb4RfFZYV/jgpeYcQ6t5MVd5n9vgOplS SY6eJTUHuF4imKHfCjLKo2tPDgZrZd+2do2DkMDJKy+8wRV+MovyVrT2e9OIXLAtiF4H UnQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9-v6si2184268plb.107.2018.08.07.16.46.11; Tue, 07 Aug 2018 16:46:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbeHHCCI (ORCPT + 99 others); Tue, 7 Aug 2018 22:02:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:41486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbeHHCCH (ORCPT ); Tue, 7 Aug 2018 22:02:07 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 B5867215EA; Tue, 7 Aug 2018 23:45:16 +0000 (UTC) Date: Tue, 7 Aug 2018 19:45:15 -0400 From: Steven Rostedt To: Joel Fernandes Cc: Joel Fernandes , LKML , "Cc: Android Kernel" , Boqun Feng , Byungchul Park , Ingo Molnar , Masami Hiramatsu , Mathieu Desnoyers , Namhyung Kim , Paul McKenney , Peter Zijlstra , Thomas Glexiner , Tom Zanussi Subject: Re: [PATCH v12 3/3] tracing: Centralize preemptirq tracepoints and unify their usage Message-ID: <20180807194515.4e549c1a@gandalf.local.home> In-Reply-To: <6B9E5DC9-0859-41B4-9B72-A7D85E9EA2AD@google.com> References: <20180730222423.196630-1-joel@joelfernandes.org> <20180730222423.196630-4-joel@joelfernandes.org> <20180806155058.5ee875f4@gandalf.local.home> <20180806214300.13e63523@gandalf.local.home> <20180807094954.5137972d@gandalf.local.home> <446AE5F2-39E0-46B6-8E0B-207E003DBF20@google.com> <20180807103410.4fe203cb@gandalf.local.home> <20180807110906.3a1b0ac4@gandalf.local.home> <6B9E5DC9-0859-41B4-9B72-A7D85E9EA2AD@google.com> X-Mailer: Claws Mail 3.16.0 (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, 07 Aug 2018 11:24:13 -0400 Joel Fernandes wrote: > On August 7, 2018 11:09:06 AM EDT, Steven Rostedt wrote: > >On Tue, 07 Aug 2018 10:48:05 -0400 > >Joel Fernandes wrote: > > > >> >You mean if someone add a tracepoint callback to the irq disable > >> >tracepoint, and did a lockdep assert to make sure interrupts are > >> >disabled? > >> > >> Yes that's what I meant. > > > >That sounds like a "Doctor, it hurts me when I do this" problem ;-) > > Haha, yes true. But just to clarify, I didn't do this to see the problem but noticed it with turning on existing things. :-) but I see your point... > OK, I hit this bug, but it's not because of the partial revert. This bug seems it needs to be another partial revert. I like you movement of the code, but I'm starting to doubt that we can use a trace event as a hook for critical areas yet. Well, not until we can use srcu in NMI. #define __DO_TRACE(tp, proto, args, cond, rcuidle) \ do { \ struct tracepoint_func *it_func_ptr; \ void *it_func; \ void *__data; \ int __maybe_unused idx = 0; \ \ if (!(cond)) \ return; \ \ /* srcu can't be used from NMI */ \ WARN_ON_ONCE(rcuidle && in_nmi()); <== WARN_ON_ONCE hit! WARNING: CPU: 3 PID: 3727 at /work/build/trace/nobackup/linux-test.git/include/trace/events/preemptirq.h:38 trace_irq_disable_rcuidle+0x2a/0x6c Modules linked in: ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ipv6 crc_ccitt r8169 ppdev parport_pc parport CPU: 3 PID: 3727 Comm: trace-cmd Not tainted 4.18.0-rc6-test+ #14 Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014 EIP: trace_irq_disable_rcuidle+0x2a/0x6c Code: e9 01 00 00 00 c3 64 8b 0d 24 e1 50 c1 0f a3 0d e0 f1 3f c1 73 55 55 89 e5 57 56 53 51 64 8b 0d cc 37 51 c1 0f ba e1 14 73 02 <0f> 0b 89 d7 89 c6 b8 e0 d8 2e c1 e8 8e 5b fa ff 8b 1d 9c 27 3d c1 EAX: c0401509 EBX: efa43680 ECX: 80110000 EDX: c0dc81f3 ESI: ed823d44 EDI: efa43680 EBP: ed823cd0 ESP: ed823cc0 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010047 CR0: 80050033 CR2: b7f06000 CR3: 30513b00 CR4: 001406f0 Call Trace: trace_hardirqs_off_caller+0x23/0x2d trace_hardirqs_off_thunk+0xc/0x10 EIP: default_do_nmi+0x1/0x157 -- Steve