Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5610889imm; Tue, 16 Oct 2018 13:03:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV629Q7HSvf8p8zoQbx7E8y6dHe9E8r2HnUrXFTbcKyVNLFW4QQB5SzEwaiMwRsWZrOj95gNS X-Received: by 2002:a63:f314:: with SMTP id l20-v6mr21011434pgh.407.1539720232811; Tue, 16 Oct 2018 13:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539720232; cv=none; d=google.com; s=arc-20160816; b=Vtoc65oHqrtMnjB26glKo5u4qqSL7aFkBChQgSLcktOYdWWsObuWj+uZAHiugYZ84F PUBzkpGDKGX0WCsjaU96P8queqhNJ0lK2fsNpDHwvR+RzUK+Vm3x0o3uUYGx8t0YiuF4 Mve0Azrq5QxCuoLgf0iC2bem9lfuFSCgCF/M2571bI65nxe1jdr1EZHR5fd0rkQoEVYu cjZ/DAuZR9702YMC152bfdZYhDxKnX9G9VuzGnJeEQzZslxcY2U8ehAlyEwEOLQT94j1 2XV7sVvGHwZn/MExYqcbRYoR4TGIylE1U09x6/3hLntFt5g5acT9QES1bTQ7/MMG3f84 fg7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3jUXMcF88Mt7C9Ai5w2U0e/r+8lwAfhWvkwWRTqxQxo=; b=yM1LZmp/dtUHRS31f8hGwn+7TLs/oXvC0hCLbSnE0A/N2HZfnhNKXBKJtNuPJTxGw0 7m4Zx3p7c+dV7XH3akM92NiKHwqNvd0EkOuROeXaxYw1OtAkEMUvatg5poKnLLruGSxb 0w4Z2U1pjBeyhmCcWeQ7nluoZjOlzkGDjhVNY/szc71nXAFSBE3FaaHsgd7W3EBmnKCB evfRB4Q30gbQcb+QYHqVp1V5KkpkslCElcwZHeieTBeoyXFTmYCOe2i/2wecHkGOJE7n MRiKYfr0FkuQM2oHdqLo6X7MgNohQ4VpeHCHaS8NFp/hE+pC/4YMDeCzT4mP7BV+ElR/ uFBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=UhczbUsQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si14714170plz.119.2018.10.16.13.03.35; Tue, 16 Oct 2018 13:03:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=UhczbUsQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727246AbeJQDzO (ORCPT + 99 others); Tue, 16 Oct 2018 23:55:14 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41658 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727162AbeJQDzO (ORCPT ); Tue, 16 Oct 2018 23:55:14 -0400 Received: by mail-pf1-f193.google.com with SMTP id m77-v6so11981612pfi.8 for ; Tue, 16 Oct 2018 13:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3jUXMcF88Mt7C9Ai5w2U0e/r+8lwAfhWvkwWRTqxQxo=; b=UhczbUsQYYrKa0DjIdtKCzjIhe5d1/kg1a+NxufR5TZw+Y79iYRD28eK+qvlitNT/r ORyF6pgQqgNdu3xEAMkPj1RvaWzG1rdM7q7bkL3uMVzL4L4GckBc8fYEL94hgnZHBEtw B21FmusaFgtrqV9ELBw2sHNsIF7c7iDeIATDI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3jUXMcF88Mt7C9Ai5w2U0e/r+8lwAfhWvkwWRTqxQxo=; b=DHc0nB/qhp2mZsmYE0lhwSfXbPQvT2fdMPAfwaosQGcnUdujn16R0dNseKustGfS/V BHjdTW3EKDCM0dc637STalK1Sl/cxshf0z9SLXoAwetp4Day0sgRzF7b3qujIl7Jzhr5 yrXR1R4gx/JnKaUBwV1TfJBNUsoXQZi2qU9reMnx4CLlYxQfkDQ2pNZ6pJk8t+ilQ9Eb BJ9j63qetlzcjCVtksYHpaTIvrwBnirX1dKpH2Qndb2jMHatzfept/Ebog65KL9tYjt7 I8P6q74Q8sq8FrM08Yoq70IPMnw5pMDZNOsixMl25pRG9QVRVy2XxrXTlndTbpBqfDQl swvQ== X-Gm-Message-State: ABuFfogz/wOSNTIF0lV8jFDjV/KgWjp6gPksYu8rLh1Dov9IeE5Rb1Dw 91Rnr4LvAD1zi9S5IWmpXXi0UrsOfaA= X-Received: by 2002:a63:e40e:: with SMTP id a14-v6mr21671583pgi.28.1539720190974; Tue, 16 Oct 2018 13:03:10 -0700 (PDT) Received: from localhost ([2620:0:1000:1601:3aef:314f:b9ea:889f]) by smtp.gmail.com with ESMTPSA id v63-v6sm18377613pgd.69.2018.10.16.13.03.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Oct 2018 13:03:09 -0700 (PDT) Date: Tue, 16 Oct 2018 13:03:08 -0700 From: Joel Fernandes To: Steven Rostedt Cc: LKML Subject: Re: [PATCH] tracing: Use trace_clock_local() for looping in preemptirq_delay_test.c Message-ID: <20181016200308.GA259794@joelaf.mtv.corp.google.com> References: <20181016094005.654275a9@gandalf.local.home> <20181016094204.363b8dd4@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181016094204.363b8dd4@gandalf.local.home> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 16, 2018 at 09:42:04AM -0400, Steven Rostedt wrote: > > Joel, > > Can you Ack this patch. I want to push it upstream as without it, your > preemptirq latency test fails on one of my boxes. Causing my automated > tests to fail (I get by with removing the test from the automation). > > -- Steve > > > On Tue, 16 Oct 2018 09:40:05 -0400 > Steven Rostedt wrote: > > > From: "Steven Rostedt (VMware)" > > > > The preemptirq_delay_test module is used for the ftrace selftest code that > > tests the latency tracers. The problem is that it uses ktime for the delay > > loop, and then checks the tracer to see if the delay loop is caught, but the > > tracer uses trace_clock_local() which uses various different other clocks to > > measure the latency. As ktime uses the clock cycles, and the code then > > converts that to nanoseconds, it causes rounding errors, and the preemptirq > > latency tests are failing due to being off by 1 (it expects to see a delay > > of 500000 us, but the delay is only 499999 us). This is happening due to a > > rounding error in the ktime (which is totally legit). The purpose of the > > test is to see if it can catch the delay, not to test the accuracy between > > trace_clock_local() and ktime_get(). Best to use apples to apples, and have > > the delay loop use the same clock as the latency tracer does. > > > > Cc: Joel Fernandes (Google) > > Cc: stable@vger.kernel.org > > Fixes: f96e8577da102 ("lib: Add module for testing preemptoff/irqsoff latency tracers") > > Signed-off-by: Steven Rostedt (VMware) Looks good to me! Acked-by: Joel Fernandes (Google) thanks, - Joel