From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752569AbcHISfk (ORCPT ); Tue, 9 Aug 2016 14:35:40 -0400 Received: from smtprelay0093.hostedemail.com ([216.40.44.93]:43478 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751919AbcHISfj (ORCPT ); Tue, 9 Aug 2016 14:35:39 -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:2198:2199:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3872:3874:4321:4362:5007:6261:6742:7875:8660:9040:10004:10400:10848:10967:11026:11232:11658:11914:12517:12519:12555:12740:13069:13148:13230:13311:13357:13439:13870:14181:14659:14721:21080:30034:30054:30055:30090:30091,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,LFtime:1,LUA_SUMMARY:none X-HE-Tag: ball26_6abc688123a46 X-Filterd-Recvd-Size: 2888 Date: Tue, 9 Aug 2016 14:35:28 -0400 From: Steven Rostedt To: Daniel Bristot de Oliveira Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Ingo Molnar , Andrew Morton , Clark Williams , Thomas Gleixner , Jon Masters , Daniel Wagner , Carsten Emde , Sebastian Andrzej Siewior , Peter Zijlstra Subject: Re: [RFC][PATCH 5/3] tracing: Add smi counting to HWLAT Message-ID: <20160809143528.7bd9e4a0@gandalf.local.home> In-Reply-To: <81075ecf-90c3-fdb2-59eb-defd215af2eb@redhat.com> References: <20160804145708.158968389@goodmis.org> <20160809140543.2e5c83b5@gandalf.local.home> <81075ecf-90c3-fdb2-59eb-defd215af2eb@redhat.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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 On Tue, 9 Aug 2016 15:28:57 -0300 Daniel Bristot de Oliveira wrote: > On 08/09/2016 03:05 PM, Steven Rostedt wrote: > > If an arch supports counting of SMIs (like newer intel chips do), then it > > can implement arch_smi_count() to return the number of SMIs that were > > triggered. The hwlat detector will call this function to get the current > > number of SMIs, and then after a period, it will read that function again, > > and if there's a difference, it will record that into the sample. > > > > For example: > > > > [99] inner:13 outer:16 ts:1470352534.886878855 > > [100] inner:14 outer:18747 ts:1470352538.917966818 smi-count:2 > > [101] inner:0 outer:19162 ts:1470352539.920988709 smi-count:6 > > [102] inner:19376 outer:19276 ts:1470352540.923010578 smi-count:6 > > [103] inner:19650 outer:20665 ts:1470352541.926032469 smi-count:6 > > [104] inner:20526 outer:20680 ts:1470352542.973055312 smi-count:6 > > [105] inner:17 outer:17 ts:1470352543.990077507 > > > > Signed-off-by: Steven Rostedt > > It worked fine in a system that I can manually cause SMIs (by turning > keyboard's backlight on and off). > > Tested-by: Daniel Bristot de Oliveira Thanks! I should also add: Suggested-by: Peter Zijlstra As Peter was the one that recommended adding the arch_smi_count() function. But I can't push this yet as this would require acks from the x86 maintainers. But if there's no complaints about the rest of the patches, I could work to get that ready. -- Steve