Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030915AbbDWUkz (ORCPT ); Thu, 23 Apr 2015 16:40:55 -0400 Received: from smtprelay0238.hostedemail.com ([216.40.44.238]:49276 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030771AbbDWUkn (ORCPT ); Thu, 23 Apr 2015 16:40:43 -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:2890:2892:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4042:4250:4362:4559:5007:6119:6261:7875:7903:8527:8957:10004:10400:10450:10455:10848:10967:11026:11232:11658:11914:12296:12517:12519:12663:12740:13069:13311:13357:14096:14097:19904:19999: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: step81_5d466e5a2e449 X-Filterd-Recvd-Size: 3219 Date: Thu, 23 Apr 2015 16:40:39 -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: <20150423164039.623193a3@gandalf.local.home> In-Reply-To: References: <20150423190825.714359844@goodmis.org> <20150423160925.7d108eaa@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: 2152 Lines: 58 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. > > > I guess I could also add an NMI notifier to let me know. But I know how > > much everyone loves notifiers :-) > > I was tempted to tell you to shoot yourself, but realized in time > that this would be politically incorrect. And I would have to go all CodeOfConflict on you. > > > > > > > Aside of that isn't there a way to detect SMI crap with performance > > > counters on recent hardware? > > > > > > > Nothing I know of that is generic enough. And just because an SMI > > triggers, doesn't mean it's bad if it is quick enough. We have had > > arguments with HW vendors about their SMIs, and used the hwlat_detector > > to show that their SMIs are not as innocent as they claim. But we also > > have seen SMIs trigger under 1us, where it doesn't affect the system. > > I know of a SMI event counter which is available on newer CPUs and > Intel promised to add a SMI cycle counter as well. I have no idea > whether that one ever materialized. PeterZ should know. Hmm, a cycle counter would be good to add. > > But at least on the machines which have the event counter it would be > usefull to include that information as well. I'll try to add onto this series to include SMI counters if they exist. Thanks, -- 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/