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: <002201d30a57$44f2ed40$ced8c7c0$@net>
Date:   Mon, 31 Jul 2017 16:46:42 -0700
From:   "Doug Smythies" <dsmythies@...us.net>
To:     "'Rafael J. Wysocki'" <rjw@...ysocki.net>, <x86@...nel.org>,
        <linux-pm@...r.kernel.org>
Cc:     "'Len Brown'" <lenb@...nel.org>, <rafael@...nel.org>,
        <tglx@...utronix.de>, <srinivas.pandruvada@...ux.intel.com>,
        <peterz@...radead.org>, <linux-kernel@...r.kernel.org>,
        "'Len Brown'" <len.brown@...el.com>
Subject: RE: [PATCH v2] cpufreq: x86: Make scaling_cur_freq behave more as expected

On 2017.07.28 05:45 Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> After commit f8475cef9008 "x86: use common aperfmperf_khz_on_cpu() to
> calculate KHz using APERF/MPERF" the scaling_cur_freq policy attribute
> in sysfs only behaves as expected on x86 with APERF/MPERF registers
> available when it is read from at least twice in a row.  The value
> returned by the first read may not be meaningful, because the
> computations in there use cached values from the previous iteration
> of aperfmperf_snapshot_khz() which may be stale.
>
> To prevent that from happening, modify arch_freq_get_on_cpu() to
> call aperfmperf_snapshot_khz() twice, with a short delay between
> these calls, if the previous invocation of aperfmperf_snapshot_khz()
> was too far back in the past (specifically, more that 1s ago).

...[deleted the rest]...

This patch seems to work fine and addresses my complaints from last week.
Thanks.

... Doug


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ