[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160401082323.GE3448@twins.programming.kicks-ass.net>
Date: Fri, 1 Apr 2016 10:23:23 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Stephane Gasparini <stephane.gasparini@...ux.intel.com>
Cc: Len Brown <lenb@...nel.org>, x86@...nel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Len Brown <len.brown@...el.com>
Subject: Re: [PATCH] x86: Calculate MHz using APERF/MPERF for cpuinfo and
scaling_cur_freq
Trim your emails
On Fri, Apr 01, 2016 at 10:16:42AM +0200, Stephane Gasparini wrote:
> > That means these delta's can be arbitrarily large, in fact the MSRs can
> > have wrapped however many times.
>
> 64 bits is 18 446 744 073 709 551 615
>
> so even assuming a 10 GHz frequency if my math are good this is more than
> 58 years before the MSR wrap around, assuming the device ran always at max
> freq.
fair enough.. but going with 10Ghz, cpu_khz would be 10e6 ~ 33 bits,
which effectively reduces the wrap/overflow time to just 31 bits, which
per that frequency is just ~1/4th of a second.
Powered by blists - more mailing lists