lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160401081639.GD3448@twins.programming.kicks-ass.net>
Date:	Fri, 1 Apr 2016 10:16:39 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Len Brown <lenb@...nel.org>
Cc:	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

On Fri, Apr 01, 2016 at 12:37:00AM -0400, Len Brown wrote:
> From: Len Brown <len.brown@...el.com>
> 
> For x86 processors with APERF/MPERF and TSC,
> return meaningful and consistent MHz in
> /proc/cpuinfo and
> /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
> 
> MHz is computed like so:
> 
> MHz = base_MHz * delta_APERF / delta_MPERF
> 
> MHz is the average frequency of the busy processor
> over a measurement interval.  The interval is
> defined to be the time between successive reads
> of the frequency on that processor, whether from
> /proc/cpuinfo or from sysfs cpufreq/scaling_cur_freq.
> As with previous methods of calculating MHz,
> idle time is excluded.

Is this really a semantic you want to pin down?

Since we're looking at doing something like:

lkml.kernel.org/r/20160303162829.GB6375@...ns.programming.kicks-ass.net

We could also just return cpu_khz * whatever fraction we store there,
knowing it is something recent.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ