Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030980AbbDWXXn (ORCPT ); Thu, 23 Apr 2015 19:23:43 -0400 Received: from smtprelay0194.hostedemail.com ([216.40.44.194]:39144 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751769AbbDWXXl (ORCPT ); Thu, 23 Apr 2015 19:23:41 -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:1542:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2691:2693:2892:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3874:4250:5007:6261:7875:10004:10400:10848:10967:11232:11658:11914:12043:12294:12517:12519:12740:13095:14093: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: work84_3ce4eef1f9242 X-Filterd-Recvd-Size: 3640 Date: Thu, 23 Apr 2015 19:23:37 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Thomas Gleixner , Linux Kernel Mailing List , "linux-rt-users@vger.kernel.org" , Ingo Molnar , Andrew Morton , Peter Zijlstra , Carsten Emde , Daniel Wagner , Jon Masters , Clark Williams Subject: Re: [RFC][PATCH 0/4] tracing: Add new hwlat_detector tracer Message-ID: <20150423192337.28bd4d33@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: 2422 Lines: 50 On Thu, 23 Apr 2015 15:50:29 -0700 Linus Torvalds wrote: > On Thu, Apr 23, 2015 at 1:21 PM, Thomas Gleixner wrote: > > > > But at least on the machines which have the event counter it would be > > usefull to include that information as well. > > In fact, I'd argue that we should *not* do this odd magic latency > measurement thing at all, exactly because Intel gave is the SMI > counter, and it's much more likely to be useful in real life. The odd > "stop machine and busy loop adn do magic" thing is a incredibly > invasive hack that sane people will never enable at all, while the No sane person should enable this on any production machine, and nor should they use the other latency tracer (irqsoff and friends). But we have used this odd magic latency measurement in dealings with vendors and such in certifying their machines. Thus, this has not been something that we just wanted to throw into the kernel for fun. This tool has actually been very helpful to us. > "add support for the hadrware we asked for and got" is a small thing > that we can do on all modern Intel chips, and can be enabled by > default because there is no downside. > What about a mix and match tracer? If the hardware supports SMI counters (and more importantly, SMI cycle counters), it will just use that, otherwise if the hardware does not support the SMI counting, it falls back to the odd magic latency measurement thing. I could even make the odd magic latency measurement thing only be enabled via a tracer flag, such that it would be safe to use the SMI counter if supported, but if it isn't supported, a tracing message will display info about the more invasive (not to be used in production environment) measurement. But the more invasive version will only be activated if the user explicitly set it (even if SMI counters were not available). And when this was first proposed, it was called smi_detector, and I believe it was Andrew that suggested to rename it to hwlat_detector, because it could theoretically, detect other types of hardware issues that could stop the CPU, in case something like that ever arise. -- 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/