* [Powertop] [RFC] [PATCH 11/11] Ignore non-P-state-enabled CPUs when calculating frequency.
@ 2012-11-05 11:12 Ivan Shapovalov
0 siblings, 0 replies; 5+ messages in thread
From: Ivan Shapovalov @ 2012-11-05 11:12 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 786 bytes --]
This fixes bogus reported CPU frequencies (actually, uninitialized
values from i965_core) when i965 monitoring is used.
Signed-off-by: Ivan Shapovalov <intelfx100(a)gmail.com>
---
src/cpu/abstract_cpu.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
index d64cb24..fea377b 100644
--- a/src/cpu/abstract_cpu.cpp
+++ b/src/cpu/abstract_cpu.cpp
@@ -380,7 +380,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
/* calculate the maximum frequency of all children */
for (i = 0; i < children.size(); i++)
- if (children[i]) {
+ if (children[i] && children[i]->has_pstates()) {
uint64_t f = 0;
if (!children[i]->idle) {
f = children[i]->current_frequency;
--
1.8.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Powertop] [RFC] [PATCH 11/11] Ignore non-P-state-enabled CPUs when calculating frequency.
@ 2012-11-13 19:14 Chris Ferron
0 siblings, 0 replies; 5+ messages in thread
From: Chris Ferron @ 2012-11-13 19:14 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
On 11/05/2012 03:12 AM, Ivan Shapovalov wrote:
> This fixes bogus reported CPU frequencies (actually, uninitialized
> values from i965_core) when i965 monitoring is used.
>
> Signed-off-by: Ivan Shapovalov <intelfx100(a)gmail.com>
> ---
> src/cpu/abstract_cpu.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
> index d64cb24..fea377b 100644
> --- a/src/cpu/abstract_cpu.cpp
> +++ b/src/cpu/abstract_cpu.cpp
> @@ -380,7 +380,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
>
> /* calculate the maximum frequency of all children */
> for (i = 0; i < children.size(); i++)
> - if (children[i]) {
> + if (children[i] && children[i]->has_pstates()) {
> uint64_t f = 0;
> if (!children[i]->idle) {
> f = children[i]->current_frequency;
This patch for the bug fix has been merged.
Thanks,
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Powertop] [RFC] [PATCH 11/11] Ignore non-P-state-enabled CPUs when calculating frequency.
@ 2012-11-13 19:23 Sergey Senozhatsky
0 siblings, 0 replies; 5+ messages in thread
From: Sergey Senozhatsky @ 2012-11-13 19:23 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]
On (11/13/12 11:14), Chris Ferron wrote:
> On 11/05/2012 03:12 AM, Ivan Shapovalov wrote:
> >This fixes bogus reported CPU frequencies (actually, uninitialized
> >values from i965_core) when i965 monitoring is used.
> >
> >Signed-off-by: Ivan Shapovalov <intelfx100(a)gmail.com>
> >---
> > src/cpu/abstract_cpu.cpp | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
> >index d64cb24..fea377b 100644
> >--- a/src/cpu/abstract_cpu.cpp
> >+++ b/src/cpu/abstract_cpu.cpp
> >@@ -380,7 +380,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
> > /* calculate the maximum frequency of all children */
> > for (i = 0; i < children.size(); i++)
> >- if (children[i]) {
> >+ if (children[i] && children[i]->has_pstates()) {
> > uint64_t f = 0;
> > if (!children[i]->idle) {
> > f = children[i]->current_frequency;
> This patch for the bug fix has been merged.
> Thanks,
> Chris
>
thanks, Chris!
sorry, my bad, I somehow forgot to ask to merge this one.
the whole patch series looks interesting and I'd like to revisit it after release. thanks Ivan.
-ss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Powertop] [RFC] [PATCH 11/11] Ignore non-P-state-enabled CPUs when calculating frequency.
@ 2012-11-14 14:30 Ivan Shapovalov
0 siblings, 0 replies; 5+ messages in thread
From: Ivan Shapovalov @ 2012-11-14 14:30 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2285 bytes --]
On 13 November 2012 11:14:52 Chris Ferron wrote:
> On 11/05/2012 03:12 AM, Ivan Shapovalov wrote:
> > This fixes bogus reported CPU frequencies (actually, uninitialized
> > values from i965_core) when i965 monitoring is used.
> >
> > Signed-off-by: Ivan Shapovalov <intelfx100(a)gmail.com>
> > ---
> >
> > src/cpu/abstract_cpu.cpp | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
> > index d64cb24..fea377b 100644
> > --- a/src/cpu/abstract_cpu.cpp
> > +++ b/src/cpu/abstract_cpu.cpp
> > @@ -380,7 +380,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
> >
> > /* calculate the maximum frequency of all children */
> > for (i = 0; i < children.size(); i++)
> >
> > - if (children[i]) {
> > + if (children[i] && children[i]->has_pstates()) {
> >
> > uint64_t f = 0;
> > if (!children[i]->idle) {
> >
> > f = children[i]->current_frequency;
>
> This patch for the bug fix has been merged.
Ugh, I forgot to notify - to make it work without previous patches,
one shall rather modify {cpu,nhm}_package::calculate_freq(),
so merging this patch alone and as-is doesn't do anything...
Please, consider this one for the release:
---
diff --git a/src/cpu/cpu_package.cpp b/src/cpu/cpu_package.cpp
index 2e2e8a3..4675167 100644
--- a/src/cpu/cpu_package.cpp
+++ b/src/cpu/cpu_package.cpp
@@ -149,7 +149,7 @@ void cpu_package::calculate_freq(uint64_t time)
/* calculate the maximum frequency of all children */
for (i = 0; i < children.size(); i++)
- if (children[i]) {
+ if (children[i] && children[i]->has_pstates()) {
uint64_t f = 0;
if (!children[i]->idle) {
f = children[i]->current_frequency;
diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 24465a0..a4ed86d 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -460,7 +460,7 @@ void nhm_package::calculate_freq(uint64_t time)
/* calculate the maximum frequency of all children */
for (i = 0; i < children.size(); i++)
- if (children[i]) {
+ if (children[i] && children[i]->has_pstates()) {
uint64_t f = 0;
if (!children[i]->idle) {
f = children[i]->current_frequency;
---
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Powertop] [RFC] [PATCH 11/11] Ignore non-P-state-enabled CPUs when calculating frequency.
@ 2012-11-14 16:32 Chris Ferron
0 siblings, 0 replies; 5+ messages in thread
From: Chris Ferron @ 2012-11-14 16:32 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]
On 11/14/2012 06:30 AM, Ivan Shapovalov wrote:
> On 13 November 2012 11:14:52 Chris Ferron wrote:
>> On 11/05/2012 03:12 AM, Ivan Shapovalov wrote:
>>> This fixes bogus reported CPU frequencies (actually, uninitialized
>>> values from i965_core) when i965 monitoring is used.
>>>
>>> Signed-off-by: Ivan Shapovalov <intelfx100(a)gmail.com>
>>> ---
>>>
>>> src/cpu/abstract_cpu.cpp | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
>>> index d64cb24..fea377b 100644
>>> --- a/src/cpu/abstract_cpu.cpp
>>> +++ b/src/cpu/abstract_cpu.cpp
>>> @@ -380,7 +380,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
>>>
>>> /* calculate the maximum frequency of all children */
>>> for (i = 0; i < children.size(); i++)
>>>
>>> - if (children[i]) {
>>> + if (children[i] && children[i]->has_pstates()) {
>>>
>>> uint64_t f = 0;
>>> if (!children[i]->idle) {
>>>
>>> f = children[i]->current_frequency;
>> This patch for the bug fix has been merged.
> Ugh, I forgot to notify - to make it work without previous patches,
> one shall rather modify {cpu,nhm}_package::calculate_freq(),
> so merging this patch alone and as-is doesn't do anything...
>
> Please, consider this one for the release:
>
> ---
> diff --git a/src/cpu/cpu_package.cpp b/src/cpu/cpu_package.cpp
> index 2e2e8a3..4675167 100644
> --- a/src/cpu/cpu_package.cpp
> +++ b/src/cpu/cpu_package.cpp
> @@ -149,7 +149,7 @@ void cpu_package::calculate_freq(uint64_t time)
>
> /* calculate the maximum frequency of all children */
> for (i = 0; i < children.size(); i++)
> - if (children[i]) {
> + if (children[i] && children[i]->has_pstates()) {
> uint64_t f = 0;
> if (!children[i]->idle) {
> f = children[i]->current_frequency;
> diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
> index 24465a0..a4ed86d 100644
> --- a/src/cpu/intel_cpus.cpp
> +++ b/src/cpu/intel_cpus.cpp
> @@ -460,7 +460,7 @@ void nhm_package::calculate_freq(uint64_t time)
>
> /* calculate the maximum frequency of all children */
> for (i = 0; i < children.size(); i++)
> - if (children[i]) {
> + if (children[i] && children[i]->has_pstates()) {
> uint64_t f = 0;
> if (!children[i]->idle) {
> f = children[i]->current_frequency;
> ---
Yep, I already caught that. Thanks for the follow up.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-14 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13 19:14 [Powertop] [RFC] [PATCH 11/11] Ignore non-P-state-enabled CPUs when calculating frequency Chris Ferron
-- strict thread matches above, loose matches on Subject: below --
2012-11-14 16:32 Chris Ferron
2012-11-14 14:30 Ivan Shapovalov
2012-11-13 19:23 Sergey Senozhatsky
2012-11-05 11:12 Ivan Shapovalov
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.