Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753904AbbHGUUl (ORCPT ); Fri, 7 Aug 2015 16:20:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45148 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373AbbHGUUk convert rfc822-to-8bit (ORCPT ); Fri, 7 Aug 2015 16:20:40 -0400 Date: Fri, 7 Aug 2015 15:20:37 -0500 From: Clark Williams To: Steven Rostedt Cc: Steven Rostedt , LKML , RT , Luiz Capitulino Subject: [RT - hwlat_detector] correctly record max when the "outer" value is maximum Message-ID: <20150807152037.02884401@sluggy> Organization: Red Hat, Inc MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1825 Lines: 46 Steven, The hwlat_detector module does not correctly record when the "outer" calculation is the largest diff seen in consecutive clock reads. This patch should properly record when outer_sample is the largest value seen: >From 8b9c14ea45991fdda2040d45647ca4d5358e8221 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Fri, 7 Aug 2015 15:07:30 -0500 Subject: [PATCH] hwlat_detector: update stats code to record when "outer" interval exceeds threshold The hwlat_detector polls the system clock (either ktime_get() or trace_clock_local()) source looking for intervals between successive reads which exceed a specified threshold. There are two intervals examined, the "inner" interval which is between t1 and t2, and the "outer" interval which is between t2 and t1' (i.e. the "next" t1 value). This patch updates the detector module to record if the outer interval is the maximum interval encountered during a run. Reported-by: Luiz Capitulino Signed-off-by: Clark Williams --- drivers/misc/hwlat_detector.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/hwlat_detector.c b/drivers/misc/hwlat_detector.c index d2676b867e41..5ca7aa9780e0 100644 --- a/drivers/misc/hwlat_detector.c +++ b/drivers/misc/hwlat_detector.c @@ -294,6 +294,8 @@ static int get_sample(void) /* Keep a running maximum ever recorded hardware latency */ if (sample > data.max_sample) data.max_sample = sample; + if (outer_sample > data.max_sample) + data.max_sample = outer_sample; } out: -- 2.4.3 -- 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/