2014-01-23 01:13:07 +00:00
Delivered-To: jwboyer@gmail.com
2014-01-23 12:35:29 +00:00
Received: by 10.76.27.197 with SMTP id v5csp2271oag;
Thu, 23 Jan 2014 01:54:21 -0800 (PST)
X-Received: by 10.66.136.131 with SMTP id qa3mr7006698pab.77.1390470860654;
Thu, 23 Jan 2014 01:54:20 -0800 (PST)
2014-01-23 01:13:07 +00:00
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
2014-01-23 12:35:29 +00:00
by mx.google.com with ESMTP id qv10si13378362pbb.142.2014.01.23.01.53.38
2014-01-23 01:13:07 +00:00
for <multiple recipients>;
2014-01-23 12:35:29 +00:00
Thu, 23 Jan 2014 01:54:20 -0800 (PST)
2014-01-23 01:13:07 +00:00
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;
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.mail=linux-kernel-owner@vger.kernel.org
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
2014-01-23 12:35:29 +00:00
id S1751970AbaAWJsq (ORCPT <rfc822;ksvahn@gmail.com> + 99 others);
Thu, 23 Jan 2014 04:48:46 -0500
Received: from merlin.infradead.org ([205.233.59.134]:55711 "EHLO
2014-01-23 01:13:07 +00:00
merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
2014-01-23 12:35:29 +00:00
with ESMTP id S1751445AbaAWJso (ORCPT
2014-01-23 01:13:07 +00:00
<rfc822;linux-kernel@vger.kernel.org>);
2014-01-23 12:35:29 +00:00
Thu, 23 Jan 2014 04:48:44 -0500
Received: from dhcp-077-248-225-117.chello.nl ([77.248.225.117] helo=twins)
2014-01-23 01:13:07 +00:00
by merlin.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux))
2014-01-23 12:35:29 +00:00
id 1W6GtY-00025n-Ny; Thu, 23 Jan 2014 09:48:21 +0000
Received: by twins (Postfix, from userid 1000)
id 0B4E580383F6; Thu, 23 Jan 2014 10:48:04 +0100 (CET)
Date: Thu, 23 Jan 2014 10:48:04 +0100
2014-01-23 01:13:07 +00:00
From: Peter Zijlstra <peterz@infradead.org>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Sasha Levin <sasha.levin@oracle.com>,
Arjan van de Ven <arjan@linux.intel.com>, lenb@kernel.org,
rjw@rjwysocki.net, Eliezer Tamir <eliezer.tamir@linux.intel.com>,
rui.zhang@intel.com, jacob.jun.pan@linux.intel.com,
Mike Galbraith <bitbucket@online.de>,
Ingo Molnar <mingo@kernel.org>, hpa@zytor.com,
paulmck@linux.vnet.ibm.com, Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>,
Andy Lutomirski <luto@amacapital.net>,
linux-kernel@vger.kernel.org, dyoung@redhat.com
Subject: Re: [PATCH 13/15] sched: Use a static_key for sched_clock_stable
2014-01-23 12:35:29 +00:00
Message-ID: <20140123094804.GP30183@twins.programming.kicks-ass.net>
References: <20140122123022.GN31570@twins.programming.kicks-ass.net>
2014-01-23 01:13:07 +00:00
<20140122131456.GA389@x4>
<52DFD50E.800@oracle.com>
<20140122183538.GA389@x4>
<20140122184253.GN30183@twins.programming.kicks-ass.net>
<20140122190905.GA391@x4>
<20140122191254.GA390@x4>
<20140122201605.GU11314@laptop.programming.kicks-ass.net>
2014-01-23 12:35:29 +00:00
<20140122210814.GC9481@laptop.programming.kicks-ass.net>
<20140122211740.GA391@x4>
2014-01-23 01:13:07 +00:00
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
2014-01-23 12:35:29 +00:00
In-Reply-To: <20140122211740.GA391@x4>
2014-01-23 01:13:07 +00:00
User-Agent: Mutt/1.5.21 (2012-12-30)
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
2014-01-23 12:35:29 +00:00
On Wed, Jan 22, 2014 at 10:17:40PM +0100, Markus Trippelsdorf wrote:
> Yes. Thanks Peter.
2014-01-23 01:13:07 +00:00
>
2014-01-23 12:35:29 +00:00
Ah much simpler patch that should have the same effect:
---
Subject: sched/x86/tsc: Initialize multiplier to 0
From: Peter Zijlstra <peterz@infradead.org>
Date: Wed, 22 Jan 2014 22:08:14 +0100
Since we keep the clock value linearly continuous on frequency change,
make sure the initial multiplier is 0, such that out initial value is
0. Without this we compute the initial value at whatever the TSC has
managed to reach since power-on.
2014-01-23 01:13:07 +00:00
2014-01-23 12:35:29 +00:00
Fixes: 20d1c86a57762 ("sched/clock, x86: Rewrite cyc2ns() to avoid the need to disable IRQs")
Cc: lenb@kernel.org
Cc: rjw@rjwysocki.net
Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Cc: rui.zhang@intel.com
Cc: jacob.jun.pan@linux.intel.com
Cc: Mike Galbraith <bitbucket@online.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: hpa@zytor.com
Cc: paulmck@linux.vnet.ibm.com
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: dyoung@redhat.com
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
2014-01-23 01:13:07 +00:00
---
2014-01-23 12:35:29 +00:00
arch/x86/kernel/tsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
2014-01-23 01:13:07 +00:00
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
2014-01-23 12:35:29 +00:00
@@ -180,7 +180,7 @@ static void cyc2ns_write_end(int cpu, st
2014-01-23 01:13:07 +00:00
2014-01-23 12:35:29 +00:00
static void cyc2ns_data_init(struct cyc2ns_data *data)
2014-01-23 01:13:07 +00:00
{
2014-01-23 12:35:29 +00:00
- data->cyc2ns_mul = 1U << CYC2NS_SCALE_FACTOR;
+ data->cyc2ns_mul = 0;
data->cyc2ns_shift = CYC2NS_SCALE_FACTOR;
data->cyc2ns_offset = 0;
data->__count = 0;
2014-01-23 01:13:07 +00:00
--
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/