Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758347AbbDWU5F (ORCPT ); Thu, 23 Apr 2015 16:57:05 -0400 Received: from smtprelay0100.hostedemail.com ([216.40.44.100]:52671 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754313AbbDWU5C (ORCPT ); Thu, 23 Apr 2015 16:57:02 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2553:2559:2562:2691:2890:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4042:4250:4423:4559:5007:6261:7875:7903:10004:10400:10848:10967:11026:11232:11658:11914:12294:12296:12517:12519:12663:12740:13069:13161:13229:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: air99_5a22515fe951b X-Filterd-Recvd-Size: 2847 Date: Thu, 23 Apr 2015 16:56:58 -0400 From: Steven Rostedt To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Ingo Molnar , Andrew Morton , Peter Zijlstra , Linus Torvalds , Carsten Emde , Daniel Wagner , Jon Masters , Clark Williams Subject: Re: [RFC][PATCH 0/4] tracing: Add new hwlat_detector tracer Message-ID: <20150423165658.30f0b046@gandalf.local.home> In-Reply-To: <20150423164039.623193a3@gandalf.local.home> References: <20150423190825.714359844@goodmis.org> <20150423160925.7d108eaa@gandalf.local.home> <20150423164039.623193a3@gandalf.local.home> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1747 Lines: 43 On Thu, 23 Apr 2015 16:40:39 -0400 Steven Rostedt wrote: > On Thu, 23 Apr 2015 22:21:11 +0200 (CEST) > Thomas Gleixner wrote: > > > > > Is the NMI code generic enough now to know that an NMI triggered, and > > > we could detect that and ignore the latencies if one did. Or perhaps > > > even add a tracepoint in the start and end of an NMI, to account for > > > it, (add hooks there), in case there's any SMIs that sneak in after an > > > NMI. > > > > There are tracepoints in nmi_enter() and nmi_exit() at least in the > > kernel source I'm looking at. > > Ah, the "trace_hardirq_enter()". That would be something I could hook > into, as the only thing that could trigger that when interrupts are > disabled happen to be NMIs. > and the naming convention fooled me :-( That's not a tracepoint, it's a hook into lockdep. There's also a ftrace_nmi_enter/exit() there too, that was once used for handling NMIs when modifying the function counters via stop machine. But now that we have switched to breakpoints, we do not need that anymore. The only user of the ftrace_nmi_enter/exit() calls is sh. Although it's not supported anymore, I'm sure I could use these handlers for the hwlat_detector too. I believe jump_labels are allowed in NMI context, and we could add hooks there to be able to jump to hwlat code. I can add a wrapper for sh to make sure that still works (even though there's no more maintainer that I know of for the arch). -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/