All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] [PATCH] cpu: Fix abstract_cpu::calculate_freq
@ 2012-09-20 14:33 Namhyung Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Namhyung Kim @ 2012-09-20 14:33 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

The 'freq' should have the maximun frequency value of all children.
But the current code does not update the freq properly.  Fix it.

Signed-off-by: Namhyung Kim <namhyung(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 386d981..de55cf2 100644
--- a/src/cpu/abstract_cpu.cpp
+++ b/src/cpu/abstract_cpu.cpp
@@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
 				is_idle = false;
 			}
 			if (f > freq)
-				f = freq;
+				freq = f;
 		}
 
 	current_frequency = freq;
-- 
1.7.9.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] cpu: Fix abstract_cpu::calculate_freq
@ 2012-09-20 14:46 Sergey Senozhatsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2012-09-20 14:46 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

On (09/20/12 23:33), Namhyung Kim wrote:
> The 'freq' should have the maximun frequency value of all children.
> But the current code does not update the freq properly.  Fix it.
> 
> Signed-off-by: Namhyung Kim <namhyung(a)gmail.com>

looks good to me, thanks.

	-ss

> ---
>  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 386d981..de55cf2 100644
> --- a/src/cpu/abstract_cpu.cpp
> +++ b/src/cpu/abstract_cpu.cpp
> @@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
>  				is_idle = false;
>  			}
>  			if (f > freq)
> -				f = freq;
> +				freq = f;
>  		}
>  
>  	current_frequency = freq;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] cpu: Fix abstract_cpu::calculate_freq
@ 2012-10-15 14:22 Namhyung Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Namhyung Kim @ 2012-10-15 14:22 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

2012-09-20 (목), 17:46 +0300, Sergey Senozhatsky:
> On (09/20/12 23:33), Namhyung Kim wrote:
> > The 'freq' should have the maximun frequency value of all children.
> > But the current code does not update the freq properly.  Fix it.
> > 
> > Signed-off-by: Namhyung Kim <namhyung(a)gmail.com>
> 
> looks good to me, thanks.
> 
> 	-ss

Ping.  

It seems that it's not merged yet.  Chris, could you please merge this?

Thanks,
Namhyung

> 
> > ---
> >  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 386d981..de55cf2 100644
> > --- a/src/cpu/abstract_cpu.cpp
> > +++ b/src/cpu/abstract_cpu.cpp
> > @@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
> >  				is_idle = false;
> >  			}
> >  			if (f > freq)
> > -				f = freq;
> > +				freq = f;
> >  		}
> >  
> >  	current_frequency = freq;


-- 
Regards,
Namhyung Kim



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] cpu: Fix abstract_cpu::calculate_freq
@ 2012-10-15 16:22 Chris Ferron
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Ferron @ 2012-10-15 16:22 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

On 09/20/2012 07:33 AM, Namhyung Kim wrote:
> The 'freq' should have the maximun frequency value of all children.
> But the current code does not update the freq properly.  Fix it.
>
> Signed-off-by: Namhyung Kim <namhyung(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 386d981..de55cf2 100644
> --- a/src/cpu/abstract_cpu.cpp
> +++ b/src/cpu/abstract_cpu.cpp
> @@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
>   				is_idle = false;
>   			}
>   			if (f > freq)
> -				f = freq;
> +				freq = f;
>   		}
>   
>   	current_frequency = freq;
Your patch has been merged
Thank You
-C

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-15 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 14:22 [Powertop] [PATCH] cpu: Fix abstract_cpu::calculate_freq Namhyung Kim
  -- strict thread matches above, loose matches on Subject: below --
2012-10-15 16:22 Chris Ferron
2012-09-20 14:46 Sergey Senozhatsky
2012-09-20 14:33 Namhyung Kim

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.