Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1700507 > unrolled thread
| Started by | "Doug Smythies" <dsmythies@telus.net> |
|---|---|
| First post | 2017-08-01 01:50 +0200 |
| Last post | 2017-08-01 03:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: [PATCH v2] cpufreq: x86: Make scaling_cur_freq behave more as expected "Doug Smythies" <dsmythies@telus.net> - 2017-08-01 01:50 +0200
Re: [PATCH v2] cpufreq: x86: Make scaling_cur_freq behave more as expected "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-01 03:00 +0200
| From | "Doug Smythies" <dsmythies@telus.net> |
|---|---|
| Date | 2017-08-01 01:50 +0200 |
| Subject | RE: [PATCH v2] cpufreq: x86: Make scaling_cur_freq behave more as expected |
| Message-ID | <u9sBH-4b7-3@gated-at.bofh.it> |
On 2017.07.28 05:45 Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.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
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2017-08-01 03:00 +0200 |
| Message-ID | <u9tHr-4Mv-5@gated-at.bofh.it> |
| In reply to | #1700507 |
On Monday, July 31, 2017 04:46:42 PM Doug Smythies wrote: > On 2017.07.28 05:45 Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.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. Thanks for the confirmation! Rafael
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web