linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
@ 2015-09-14  5:17 Shilpasri G Bhat
  2015-09-14  7:06 ` Viresh Kumar
  2015-09-14  8:31 ` [PATCH v2] " Shilpasri G Bhat
  0 siblings, 2 replies; 5+ messages in thread
From: Shilpasri G Bhat @ 2015-09-14  5:17 UTC (permalink / raw)
  To: rjw; +Cc: viresh.kumar, linuxppc-dev, linux-kernel, linux-pm,
	Shilpasri G Bhat

Log a 'critical' message if the max frequency is reduced below nominal
frequency. We already log 'info' message if the max frequency is
capped below turbo frequency. CPU should guarantee atleast nominal
frequency, but not turbo frequency in all system configurations and
environments. So report the pmax throttling with severity when Pmax is
dipped below nominal frequency.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
---
 drivers/cpufreq/powernv-cpufreq.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 64994e1..2d9ed42 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -327,8 +327,13 @@ static void powernv_cpufreq_throttle_check(void *data)
 		if (chips[i].throttled)
 			goto next;
 		chips[i].throttled = true;
-		pr_info("CPU %d on Chip %u has Pmax reduced to %d\n", cpu,
-			chips[i].id, pmsr_pmax);
+		if (pmsr_pmax < powernv_pstate_info.nominal)
+			pr_crit("CPU %d on Chip %u has Pmax reduced to %d\n",
+				cpu, chips[i].id, pmsr_pmax);
+		else
+			pr_info("CPU %d on Chip %u has Pmax reduced to %d\n",
+				cpu, chips[i].id, pmsr_pmax);
+
 	} else if (chips[i].throttled) {
 		chips[i].throttled = false;
 		pr_info("CPU %d on Chip %u has Pmax restored to %d\n", cpu,
-- 
1.9.3

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

* Re: [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
  2015-09-14  5:17 [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency Shilpasri G Bhat
@ 2015-09-14  7:06 ` Viresh Kumar
  2015-09-14  8:31 ` [PATCH v2] " Shilpasri G Bhat
  1 sibling, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2015-09-14  7:06 UTC (permalink / raw)
  To: Shilpasri G Bhat; +Cc: rjw, linuxppc-dev, linux-kernel, linux-pm

On 14-09-15, 10:47, Shilpasri G Bhat wrote:
> Log a 'critical' message if the max frequency is reduced below nominal
> frequency. We already log 'info' message if the max frequency is
> capped below turbo frequency. CPU should guarantee atleast nominal
> frequency, but not turbo frequency in all system configurations and
> environments. So report the pmax throttling with severity when Pmax is
> dipped below nominal frequency.
> 
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> ---
>  drivers/cpufreq/powernv-cpufreq.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> index 64994e1..2d9ed42 100644
> --- a/drivers/cpufreq/powernv-cpufreq.c
> +++ b/drivers/cpufreq/powernv-cpufreq.c
> @@ -327,8 +327,13 @@ static void powernv_cpufreq_throttle_check(void *data)
>  		if (chips[i].throttled)
>  			goto next;
>  		chips[i].throttled = true;
> -		pr_info("CPU %d on Chip %u has Pmax reduced to %d\n", cpu,
> -			chips[i].id, pmsr_pmax);
> +		if (pmsr_pmax < powernv_pstate_info.nominal)
> +			pr_crit("CPU %d on Chip %u has Pmax reduced to %d\n",
> +				cpu, chips[i].id, pmsr_pmax);
> +		else
> +			pr_info("CPU %d on Chip %u has Pmax reduced to %d\n",
> +				cpu, chips[i].id, pmsr_pmax);

I think the messages here can be improved a bit here to something
like:

			pr_warn("CPU %d on Chip %u has Pmax reduced below nominal freq (%d < %d)\n",
                                 cpu, chips[i].id, pmsr_pmax, powernv_pstate_info.nominal);

And similarly for the pr_info case as well.

-- 
viresh

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

* [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
  2015-09-14  5:17 [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency Shilpasri G Bhat
  2015-09-14  7:06 ` Viresh Kumar
@ 2015-09-14  8:31 ` Shilpasri G Bhat
  2015-09-14 10:28   ` Viresh Kumar
  1 sibling, 1 reply; 5+ messages in thread
From: Shilpasri G Bhat @ 2015-09-14  8:31 UTC (permalink / raw)
  To: rjw, viresh.kumar; +Cc: linuxppc-dev, linux-kernel, linux-pm, Shilpasri G Bhat

Log a 'critical' message if the max frequency is reduced below nominal
frequency. We already log 'info' message if the max frequency is
capped below turbo frequency. CPU should guarantee atleast nominal
frequency, but not turbo frequency in all system configurations and
environments. So report the pmax throttling with severity when Pmax is
dipped below nominal frequency.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
---
Changes from v1:
- Modified the printk messages as per Viresh's suggestion.

 drivers/cpufreq/powernv-cpufreq.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 64994e1..cb50138 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -327,8 +327,14 @@ static void powernv_cpufreq_throttle_check(void *data)
 		if (chips[i].throttled)
 			goto next;
 		chips[i].throttled = true;
-		pr_info("CPU %d on Chip %u has Pmax reduced to %d\n", cpu,
-			chips[i].id, pmsr_pmax);
+		if (pmsr_pmax < powernv_pstate_info.nominal)
+			pr_crit("CPU %d on Chip %u has Pmax reduced below nominal frequency (%d < %d)\n",
+				cpu, chips[i].id, pmsr_pmax,
+				powernv_pstate_info.nominal);
+		else
+			pr_info("CPU %d on Chip %u has Pmax reduced below turbo frequency (%d < %d)\n",
+				cpu, chips[i].id, pmsr_pmax,
+				powernv_pstate_info.max);
 	} else if (chips[i].throttled) {
 		chips[i].throttled = false;
 		pr_info("CPU %d on Chip %u has Pmax restored to %d\n", cpu,
-- 
1.9.3

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

* Re: [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
  2015-09-14  8:31 ` [PATCH v2] " Shilpasri G Bhat
@ 2015-09-14 10:28   ` Viresh Kumar
  2015-10-05 20:50     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2015-09-14 10:28 UTC (permalink / raw)
  To: Shilpasri G Bhat; +Cc: rjw, linuxppc-dev, linux-kernel, linux-pm

On 14-09-15, 14:01, Shilpasri G Bhat wrote:
> Log a 'critical' message if the max frequency is reduced below nominal
> frequency. We already log 'info' message if the max frequency is
> capped below turbo frequency. CPU should guarantee atleast nominal
> frequency, but not turbo frequency in all system configurations and
> environments. So report the pmax throttling with severity when Pmax is
> dipped below nominal frequency.
> 
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> ---
> Changes from v1:
> - Modified the printk messages as per Viresh's suggestion.
> 
>  drivers/cpufreq/powernv-cpufreq.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> index 64994e1..cb50138 100644
> --- a/drivers/cpufreq/powernv-cpufreq.c
> +++ b/drivers/cpufreq/powernv-cpufreq.c
> @@ -327,8 +327,14 @@ static void powernv_cpufreq_throttle_check(void *data)
>  		if (chips[i].throttled)
>  			goto next;
>  		chips[i].throttled = true;
> -		pr_info("CPU %d on Chip %u has Pmax reduced to %d\n", cpu,
> -			chips[i].id, pmsr_pmax);
> +		if (pmsr_pmax < powernv_pstate_info.nominal)
> +			pr_crit("CPU %d on Chip %u has Pmax reduced below nominal frequency (%d < %d)\n",
> +				cpu, chips[i].id, pmsr_pmax,
> +				powernv_pstate_info.nominal);
> +		else
> +			pr_info("CPU %d on Chip %u has Pmax reduced below turbo frequency (%d < %d)\n",
> +				cpu, chips[i].id, pmsr_pmax,
> +				powernv_pstate_info.max);
>  	} else if (chips[i].throttled) {
>  		chips[i].throttled = false;
>  		pr_info("CPU %d on Chip %u has Pmax restored to %d\n", cpu,

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-- 
viresh

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

* Re: [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
  2015-09-14 10:28   ` Viresh Kumar
@ 2015-10-05 20:50     ` Rafael J. Wysocki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2015-10-05 20:50 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: Shilpasri G Bhat, linuxppc-dev, linux-kernel, linux-pm

On Monday, September 14, 2015 03:58:09 PM Viresh Kumar wrote:
> On 14-09-15, 14:01, Shilpasri G Bhat wrote:
> > Log a 'critical' message if the max frequency is reduced below nominal
> > frequency. We already log 'info' message if the max frequency is
> > capped below turbo frequency. CPU should guarantee atleast nominal
> > frequency, but not turbo frequency in all system configurations and
> > environments. So report the pmax throttling with severity when Pmax is
> > dipped below nominal frequency.
> > 
> > Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> > ---
> > Changes from v1:
> > - Modified the printk messages as per Viresh's suggestion.
> > 
> >  drivers/cpufreq/powernv-cpufreq.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> > index 64994e1..cb50138 100644
> > --- a/drivers/cpufreq/powernv-cpufreq.c
> > +++ b/drivers/cpufreq/powernv-cpufreq.c
> > @@ -327,8 +327,14 @@ static void powernv_cpufreq_throttle_check(void *data)
> >  		if (chips[i].throttled)
> >  			goto next;
> >  		chips[i].throttled = true;
> > -		pr_info("CPU %d on Chip %u has Pmax reduced to %d\n", cpu,
> > -			chips[i].id, pmsr_pmax);
> > +		if (pmsr_pmax < powernv_pstate_info.nominal)
> > +			pr_crit("CPU %d on Chip %u has Pmax reduced below nominal frequency (%d < %d)\n",
> > +				cpu, chips[i].id, pmsr_pmax,
> > +				powernv_pstate_info.nominal);
> > +		else
> > +			pr_info("CPU %d on Chip %u has Pmax reduced below turbo frequency (%d < %d)\n",
> > +				cpu, chips[i].id, pmsr_pmax,
> > +				powernv_pstate_info.max);
> >  	} else if (chips[i].throttled) {
> >  		chips[i].throttled = false;
> >  		pr_info("CPU %d on Chip %u has Pmax restored to %d\n", cpu,
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Applied, thanks!

Rafael

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

end of thread, other threads:[~2015-10-05 20:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14  5:17 [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency Shilpasri G Bhat
2015-09-14  7:06 ` Viresh Kumar
2015-09-14  8:31 ` [PATCH v2] " Shilpasri G Bhat
2015-09-14 10:28   ` Viresh Kumar
2015-10-05 20:50     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).