Message ID | 1432931068-4980-3-git-send-email-john.stultz@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBCJ7RPMX4EMBBC4WUOVQKGQELGANIJY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E627B218E7 for <linaro@patches.linaro.org>; Fri, 29 May 2015 20:24:43 +0000 (UTC) Received: by wgv5 with SMTP id 5sf16614459wgv.0 for <linaro@patches.linaro.org>; Fri, 29 May 2015 13:24:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=KJMZ8XyeiXoE0bk9DQzbuMEuDMO4Wz+ouSlqEWtDXD8=; b=HaCVjwOCr/rOKGoXBHyfCYy4efYfKXs7J3Lar4c3qNIt4UXbRdWShGdLKYtqb0nLbp 1Xp3vRrMK74e7m1SPFySM6M1mbLbBpbLOe0IlfHUrjAyNzUm7YQmJECiUoPseR91Wubo 0A3w5Aozi6SlswhCljxewzr2cDOkx/91Do2G5Zt+6xz5Qs2pSvY7jiz2hwXuSbvy/DQq HeF+kFy/B1+3pKHn4iLKFeeEvaQWsK+nQR/DXXjQAnniHwG6F22pkVzieyiUKFVvy4jv VLIShqbNv7HUR3EssNYu+KpCJKqXtvzdWziOXedfa04vtV0oefn793dJvQ9Z+4w7O004 HDtA== X-Gm-Message-State: ALoCoQnTpE5ZHz8WTKjvLBsZeREFuw2gR2xSfsfzn9YQS6IHeEUTUNuWIjZ1hIsRNos+eaq5JlH1 X-Received: by 10.152.8.17 with SMTP id n17mr8782750laa.0.1432931083200; Fri, 29 May 2015 13:24:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.1 with SMTP id o1ls422758lao.12.gmail; Fri, 29 May 2015 13:24:43 -0700 (PDT) X-Received: by 10.152.6.1 with SMTP id w1mr9602427law.91.1432931083050; Fri, 29 May 2015 13:24:43 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id zl2si5573568lbb.55.2015.05.29.13.24.43 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 13:24:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbqq2 with SMTP id qq2so55454970lbb.3 for <patchwork-forward@linaro.org>; Fri, 29 May 2015 13:24:43 -0700 (PDT) X-Received: by 10.152.4.72 with SMTP id i8mr10053092lai.32.1432931082868; Fri, 29 May 2015 13:24:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp615372lbb; Fri, 29 May 2015 13:24:41 -0700 (PDT) X-Received: by 10.68.244.73 with SMTP id xe9mr17884624pbc.98.1432931079188; Fri, 29 May 2015 13:24:39 -0700 (PDT) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com. [209.85.220.48]) by mx.google.com with ESMTPS id 11si8378584pda.42.2015.05.29.13.24.38 for <patches@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 13:24:39 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.48 as permitted sender) client-ip=209.85.220.48; Received: by pacrp13 with SMTP id rp13so21363951pac.2 for <patches@linaro.org>; Fri, 29 May 2015 13:24:38 -0700 (PDT) X-Received: by 10.70.44.199 with SMTP id g7mr17944512pdm.27.1432931078314; Fri, 29 May 2015 13:24:38 -0700 (PDT) Received: from localhost.localdomain (c-71-63-136-39.hsd1.or.comcast.net. [71.63.136.39]) by mx.google.com with ESMTPSA id qs8sm6452549pbc.38.2015.05.29.13.24.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 May 2015 13:24:37 -0700 (PDT) From: John Stultz <john.stultz@linaro.org> To: lkml <linux-kernel@vger.kernel.org> Cc: John Stultz <john.stultz@linaro.org>, Prarit Bhargava <prarit@redhat.com>, Daniel Bristot de Oliveira <bristot@redhat.com>, Richard Cochran <richardcochran@gmail.com>, Jan Kara <jack@suse.cz>, Jiri Bohac <jbohac@suse.cz>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Shuah Khan <shuahkh@osg.samsung.com> Subject: [RFC][PATCH 2/4] timer_list: Add the base offset so remaining nsecs are accurate for non monotonic timers Date: Fri, 29 May 2015 13:24:26 -0700 Message-Id: <1432931068-4980-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432931068-4980-1-git-send-email-john.stultz@linaro.org> References: <1432931068-4980-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index e878c2e..05a560f 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -132,7 +132,7 @@ print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now) (unsigned long long) ktime_to_ns(base->offset)); #endif SEQ_printf(m, "active timers:\n"); - print_active_timers(m, base, now); + print_active_timers(m, base, now + ktime_to_ns(base->offset)); } static void print_cpu(struct seq_file *m, int cpu, u64 now)
I noticed for non-monotonic timers in timer_list, some of the output looked a little confusing. For example: #1: <0000000000000000>, posix_timer_fn, S:01, hrtimer_start_range_ns, leap-a-day/2360 # expires at 1434412800000000000-1434412800000000000 nsecs [in 1434410725062375469 to 1434410725062375469 nsecs] You'll note the relative time till the expiration "[in xxx to yyy nsecs]" is incorrect. This is because its printing the delta between CLOCK_MONOTONIC time to the CLOCK_REALTIME expiration. This patch fixes this issue by adding the clock offset to the "now" time which we use to calculate the delta. Cc: Prarit Bhargava <prarit@redhat.com> Cc: Daniel Bristot de Oliveira <bristot@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Jan Kara <jack@suse.cz> Cc: Jiri Bohac <jbohac@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: John Stultz <john.stultz@linaro.org> --- kernel/time/timer_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)