All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Gasparini <stephane.gasparini@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>,
	x86@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Len Brown <len.brown@intel.com>
Subject: Re: [PATCH] x86: Calculate MHz using APERF/MPERF for cpuinfo and scaling_cur_freq
Date: Fri, 1 Apr 2016 10:29:23 +0200	[thread overview]
Message-ID: <20160401082923.GH11035@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160401082323.GE3448@twins.programming.kicks-ass.net>

On Fri, Apr 01, 2016 at 10:23:23AM +0200, Peter Zijlstra wrote:
> 
> 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,

I can't do maths this morning; 23 bits

> which effectively reduces the wrap/overflow time to just 31 bits, which
> per that frequency is just ~1/4th of a second.

41 giving lots more, but a reasonable time to wrap/overflow.

  reply	other threads:[~2016-04-01  8:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6e0c25e64e0fb65a42dfc63ad5f660302e07cd87.1459485198.git.len.brown@intel.com>
2016-04-01  4:37 ` [PATCH] x86: Calculate MHz using APERF/MPERF for cpuinfo and scaling_cur_freq Len Brown
2016-04-01  7:56   ` [PATCH] x86: Calculate MHz using APERF/MPERF for cpuinfo and scaling_cur_freqy Thomas Gleixner
2016-04-01  8:03   ` [PATCH] x86: Calculate MHz using APERF/MPERF for cpuinfo and scaling_cur_freq Peter Zijlstra
2016-04-01  8:16     ` Stephane Gasparini
2016-04-01  8:23       ` Peter Zijlstra
2016-04-01  8:29         ` Peter Zijlstra [this message]
2016-04-01  9:30           ` Stephane Gasparini
2016-04-01  9:38             ` Peter Zijlstra
2016-04-01  9:50             ` Borislav Petkov
2016-04-02  5:22               ` Len Brown
2016-04-01  8:16   ` Peter Zijlstra
2016-04-24 16:38   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160401082923.GH11035@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=stephane.gasparini@linux.intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.