PM / EM: Micro optimization in em_pd_energy
PATCH 1/1 PM / EM: Micro optimization in em_pd_energy
When the sum of the utilization of CPUs in a power domain is zero, return the energy as 0 without doing any computations.
--- include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/energy_model.h +3 -0
@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Hi Pavan,
Quoted 1 line · Pavankumar Kondeti
When the sum of the utilization of CPUs in a power domain is zero,
s/power/performance
Quoted 12 lines
return the energy as 0 without doing any computations.
Signed-off-by Pavankumar Kondeti <[email protected]>--- include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/energy_model.h +0
-0
include/linux/energy_model.h static inline unsigned long em_cpu_energy(struct em_perf_domain *pd, · line 111
Quoted 9 lines
include/linux/energy_model.h +3
-0@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested
Makes sense to me, so with nit above:
Thanks!
Quentin
Quoted 31 lines · Quentin Perret
Hi Pavan,
Quoted 1 line · Pavankumar Kondeti
When the sum of the utilization of CPUs in a power domain is zero,
s/power/performance
Quoted 12 lines
return the energy as 0 without doing any computations.
Signed-off-by Pavankumar Kondeti <[email protected]>--- include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/energy_model.h +0
-0include/linux/energy_model.h static inline unsigned long em_cpu_energy(struct em_perf_domain *pd, · line 111
Quoted 9 lines
include/linux/energy_model.h +3
-0@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested Makes sense to me, so with nit above:
Quoted 2 lines
Acked-by Quentin Perret <[email protected]>
Thanks Quentin. I have updated the patch as per your correction.
Thanks,
Pavan
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v2 1/1 PM / EM: Micro optimization in em_cpu_energy
In reply to Pavankumar KondetiWhen the sum of the utilization of CPUs in a power domain is zero, return the energy as 0 without doing any computations.
---
V2: Fixed the function name in the commit message.
include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/energy_model.h +3 -0
@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v3 1/1 PM / EM: Micro optimization in em_cpu_energy
When the sum of the utilization of CPUs in a performance domain is zero, return the energy as 0 without doing any computations.
---
V3: %s/power/performance as corrected by Quentin
V2: Fixed the function name in the commit message.
include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/energy_model.h +3 -0
@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH V3] PM / EM: Micro optimization in em_cpu_energy
Quoted 16 lines · Pavankumar Kondeti
When the sum of the utilization of CPUs in a performance domain is zero, return the energy as 0 without doing any computations.
Signed-off-by Pavankumar Kondeti <[email protected]>---
V3: %s/power/performance as corrected by Quentin
V2: Fixed the function name in the commit message.include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/energy_model.h +0
-0
include/linux/energy_model.h static inline unsigned long em_cpu_energy(struct em_perf_domain *pd, · line 111
Quoted 9 lines
include/linux/energy_model.h +3
-0@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested
LGTM.
Re: [PATCH V2] PM / EM: Micro optimization in em_cpu_energy
In reply to Pavankumar KondetiQuoted 15 lines · Pavankumar Kondeti
When the sum of the utilization of CPUs in a power domain is zero, return the energy as 0 without doing any computations.
Signed-off-by Pavankumar Kondeti <[email protected]>---
V2: Fixed the function name in the commit message.include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/energy_model.h +0
-0
include/linux/energy_model.h static inline unsigned long em_cpu_energy(struct em_perf_domain *pd, · line 111
Quoted 9 lines
include/linux/energy_model.h +3
-0@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested
If I'm to take this, please resend it with a CC to [email protected] (and with the tags you've received so far).
Thanks!
PATCH RESEND v3 1/1 PM / EM: Micro optimization in em_cpu_energy
When the sum of the utilization of CPUs in a power domain is zero, return the energy as 0 without doing any computations.
--- include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/energy_model.h +3 -0
@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [RESEND PATCH V3] PM / EM: Micro optimization in em_cpu_energy
Quoted 16 lines · Pavankumar Kondeti
When the sum of the utilization of CPUs in a power domain is zero, return the energy as 0 without doing any computations.
Acked-by Quentin Perret <[email protected]>Reviewed-by Dietmar Eggemann <[email protected]>Signed-off-by Pavankumar Kondeti <[email protected]>--- include/linux/energy_model.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/energy_model.h +0
-0
include/linux/energy_model.h static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,
Quoted 10 lines
include/linux/energy_model.h +3
-1@@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,struct em_perf_state *ps;int i, cpu; +if (!sum_util) +return 0 ; +/* * In order to predict the performance state, map the utilization of * the most utilized CPU of the performance domain to a requested --
Applied as 5.11 material, thanks!