Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1223836 > unrolled thread

[PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency

Started byShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
First post2015-09-14 07:20 +0200
Last post2015-09-14 12:30 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> - 2015-09-14 07:20 +0200
    Re: [PATCH] cpufreq : powernv: Report Pmax throttling if capped  below nominal frequency Viresh Kumar <viresh.kumar@linaro.org> - 2015-09-14 09:10 +0200
    [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> - 2015-09-14 10:50 +0200
      Re: [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped  below nominal frequency Viresh Kumar <viresh.kumar@linaro.org> - 2015-09-14 12:30 +0200

#1223836 — [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency

FromShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Date2015-09-14 07:20 +0200
Subject[PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
Message-ID<q8ulj-4Xm-1@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1223866 — Re: [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-09-14 09:10 +0200
SubjectRe: [PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
Message-ID<q8w3M-7rr-17@gated-at.bofh.it>
In reply to#1223836
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1223932 — [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency

FromShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Date2015-09-14 10:50 +0200
Subject[PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
Message-ID<q8xCx-14B-3@gated-at.bofh.it>
In reply to#1223836
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1224011 — Re: [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-09-14 12:30 +0200
SubjectRe: [PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency
Message-ID<q8zbl-3r6-29@gated-at.bofh.it>
In reply to#1223932
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web