Misc RAPL updates
cover Misc RAPL updates
A couple of small updates to support Skylake server and make it less noisy on KVM.
Jacob Pan (2):
powercap/rapl: add support for skx
powercap/rapl: reduce warning level
drivers/powercap/intel_rapl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
PATCH 1/2 powercap/rapl: add support for skx
SKX RAPL interface is similar to HSX/BDX.
--- drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl.c +1 -0
@@ -1096,6 +1096,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {RAPL_CPU (0x4E , rapl_defaults_core),/* Skylake */ RAPL_CPU (0x4C , rapl_defaults_cht),/* Braswell/Cherryview */ RAPL_CPU (0x4A , rapl_defaults_tng),/* Tangier */ +RAPL_CPU (0x55 , rapl_defaults_hsw_server),/* Skylake server */ RAPL_CPU (0x56 , rapl_defaults_core),/* Future Xeon */ RAPL_CPU (0x5A , rapl_defaults_ann),/* Annidale */ RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */
Signature · 1 line
1.9.1
Re: [PATCH 1/2] powercap/rapl: add support for skx
Quoted 13 lines · Jacob Pan
SKX RAPL interface is similar to HSX/BDX.
Signed-off-by Jacob Pan <[email protected]>--- drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+)drivers/powercap/intel_rapl.c +0
-0
drivers/powercap/intel_rapl.c static const struct x86_cpu_id rapl_ids[] __initconst = { · line 1102
Quoted 7 lines
drivers/powercap/intel_rapl.c +1
-0@@ -1096,6 +1096,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {RAPL_CPU (0x4E , rapl_defaults_core),/* Skylake */ RAPL_CPU (0x4C , rapl_defaults_cht),/* Braswell/Cherryview */ RAPL_CPU (0x4A , rapl_defaults_tng),/* Tangier */ +RAPL_CPU (0x55 , rapl_defaults_hsw_server),/* Skylake server */ RAPL_CPU (0x56 , rapl_defaults_core),/* Future Xeon */ RAPL_CPU (0x5A , rapl_defaults_ann),/* Annidale */ RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */
Can you please rebase this on top of 4.7-rc3?
Thanks,
Rafael
Re: [PATCH 1/2] powercap/rapl: add support for skx
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Jacob Pan
SKX RAPL interface is similar to HSX/BDX.
Signed-off-by Jacob Pan <[email protected]>--- drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+)
Quoted 15 lines
drivers/powercap/intel_rapl.c static const struct x86_cpu_id rapl_ids[] __initconst = { · line 1102
Quoted 13 lines
drivers/powercap/intel_rapl.c +1
-0@@ -1096,6 +1096,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {RAPL_CPU (0x4E , rapl_defaults_core),/* Skylake */ RAPL_CPU (0x4C , rapl_defaults_cht),/* Braswell/Cherryview */ RAPL_CPU (0x4A , rapl_defaults_tng),/* Tangier */ +RAPL_CPU (0x55 , rapl_defaults_hsw_server),/* Skylake server */ RAPL_CPU (0x56 , rapl_defaults_core),/* Future Xeon */ RAPL_CPU (0x5A , rapl_defaults_ann),/* Annidale */ RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */Can you please rebase this on top of 4.7-rc3?
Or rather on top of the x86/cpu branch from tip?
BTW, I can take the Denverton support for RAPL too (unless already applied elsewhere), but it has to be based on x86/cpu as well.
Thanks,
Rafael
Re: [PATCH 1/2] powercap/rapl: add support for skx
Quoted 25 lines · On Mon, 13 Jun 2016 23:56:18 +0200 "Rafael J. Wysocki" <[email protected]>…
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Jacob Pan
SKX RAPL interface is similar to HSX/BDX.
Signed-off-by Jacob Pan <[email protected]>--- drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+)Quoted 15 lines
drivers/powercap/intel_rapl.c static const struct x86_cpu_id rapl_ids[] __initconst = { · line 1102
Quoted 13 lines
(quoted diff) +0
-0
b/drivers/powercap/intel_rapl.cindex 470bb62..a417e68 100644drivers/powercap/intel_rapl.c +0
-0@@ -1096,6 +1096,7 @@ static const struct x86_cpu_id rapl_ids[]
__initconst= {RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */
RAPL_CPU(0x4C, rapl_defaults_cht),/* Braswell/Cherryview
*/RAPL_CPU(0x4A, rapl_defaults_tng),/* Tangier */drivers/powercap/intel_rapl.c +1
-0+ RAPL_CPU(0x55, rapl_defaults_hsw_server),/* Skylakeserver */
RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */drivers/powercap/intel_rapl.c +0
-0RAPL_CPU (0x5A , rapl_defaults_ann),/* Annidale */ RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */Can you please rebase this on top of 4.7-rc3?
Quoted 2 lines
Or rather on top of the x86/cpu branch from tip?
done. just sent you v2.
[PATCH v2] powercap/rapl: add support for denverton
Quoted 3 lines
BTW, I can take the Denverton support for RAPL too (unless already applied elsewhere), but it has to be based on x86/cpu as well.
Not applied elsewhere, please take it. I was confused powercap/rapl with perf/rapl which should be in tip.
Rafael J. Wysocki
maintainerRe: [PATCH 1/2] powercap/rapl: add support for skx
Quoted 28 lines · Jacob Pan
Quoted 25 lines · On Mon, 13 Jun 2016 23:56:18 +0200 "Rafael J. Wysocki" <[email protected]>…
Quoted 23 lines · Rafael J. Wysocki
Quoted 12 lines · Jacob Pan
SKX RAPL interface is similar to HSX/BDX.
Signed-off-by Jacob Pan <[email protected]>--- drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/drivers/powercap/intel_rapl.cindex 470bb62..a417e68 100644drivers/powercap/intel_rapl.c +0
-0@@ -1096,6 +1096,7 @@ static const struct x86_cpu_id rapl_ids[]Quoted 8 lines
__initconst= {RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */
RAPL_CPU(0x4C, rapl_defaults_cht),/* Braswell/Cherryview
*/RAPL_CPU(0x4A, rapl_defaults_tng),/* Tangier */
+RAPL_CPU(0x55, rapl_defaults_hsw_server),/* Skylake server */RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */RAPL_CPU(0x5A, rapl_defaults_ann),/* Annidale */RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */Can you please rebase this on top of 4.7-rc3?
Quoted 4 lines
Quoted 2 lines
Or rather on top of the x86/cpu branch from tip?
done. just sent you v2.
[PATCH v2] powercap/rapl: add support for denverton
Thanks for that one, but the $subject one was for SKX. Any chance to rebase and resend this one too?
Re: [PATCH 1/2] powercap/rapl: add support for skx
Quoted 30 lines · On Tue, 14 Jun 2016 02:21:41 +0200 "Rafael J. Wysocki" <[email protected]>…
Quoted 28 lines · Jacob Pan
Quoted 25 lines · On Mon, 13 Jun 2016 23:56:18 +0200 "Rafael J. Wysocki" <[email protected]>…
Quoted 23 lines · Rafael J. Wysocki
Quoted 12 lines · Jacob Pan
SKX RAPL interface is similar to HSX/BDX.
Signed-off-by Jacob Pan <[email protected]>--- drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/drivers/powercap/intel_rapl.cindex 470bb62..a417e68 100644drivers/powercap/intel_rapl.c +0
-0@@ -1096,6 +1096,7 @@ static const struct x86_cpu_id rapl_ids[]Quoted 8 lines
__initconst= {RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */RAPL_CPU(0x4C, rapl_defaults_cht),/* Braswell/Cherryview */RAPL_CPU(0x4A, rapl_defaults_tng),/* Tangier */
+RAPL_CPU(0x55, rapl_defaults_hsw_server),/* Skylake server */RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */RAPL_CPU(0x5A, rapl_defaults_ann),/* Annidale */RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */Can you please rebase this on top of 4.7-rc3?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Or rather on top of the x86/cpu branch from tip?
done. just sent you v2.
[PATCH v2] powercap/rapl: add support for denvertonThanks for that one, but the $subject one was for SKX. Any chance to rebase and resend this one too?
SKX has already been added by commit below in tip/x86/cpu:
commit d40671e30cb46e834651e0ce3d4590c915171414
Author: Dave Hansen <[email protected]> Date: Thu Jun 2 17:19:55 2016 -0700
x86, powercap, rapl: Add Skylake Server model number
SKX uses similar RAPL interface as Broadwell server according to Jacob Pan.
drivers/powercap/intel_rapl.c +1 -0
@@ -1114,6 +1114,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {RAPL_CPU (INTEL_FAM6_SKYLAKE_DESKTOP , rapl_defaults_core),RAPL_CPU (INTEL_FAM6_SKYLAKE_MOBILE , rapl_defaults_core), +RAPL_CPU (INTEL_FAM6_SKYLAKE_X , rapl_defaults_hsw_server),RAPL_CPU (INTEL_FAM6_KABYLAKE_MOBILE , rapl_defaults_core), RAPL_CPU(INTEL_FAM6_KABYLAKE_DESKTOP, rapl_defaults_core),
Re: [PATCH 1/2] powercap/rapl: add support for skx
Quoted 41 lines · Jacob Pan
Quoted 30 lines · On Tue, 14 Jun 2016 02:21:41 +0200 "Rafael J. Wysocki" <[email protected]>…
Quoted 28 lines · Jacob Pan
Quoted 25 lines · On Mon, 13 Jun 2016 23:56:18 +0200 "Rafael J. Wysocki" <[email protected]>…
Quoted 23 lines · Rafael J. Wysocki
Quoted 12 lines · Jacob Pan
SKX RAPL interface is similar to HSX/BDX.
Signed-off-by Jacob Pan <[email protected]>--- drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/drivers/powercap/intel_rapl.cindex 470bb62..a417e68 100644drivers/powercap/intel_rapl.c +0
-0@@ -1096,6 +1096,7 @@ static const struct x86_cpu_id rapl_ids[]Quoted 8 lines
__initconst= {RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */RAPL_CPU(0x4C, rapl_defaults_cht),/* Braswell/Cherryview */RAPL_CPU(0x4A, rapl_defaults_tng),/* Tangier */
+RAPL_CPU(0x55, rapl_defaults_hsw_server),/* Skylake server */RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */RAPL_CPU(0x5A, rapl_defaults_ann),/* Annidale */RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */Can you please rebase this on top of 4.7-rc3?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Or rather on top of the x86/cpu branch from tip?
done. just sent you v2.
[PATCH v2] powercap/rapl: add support for denvertonThanks for that one, but the $subject one was for SKX. Any chance to rebase and resend this one too?
Quoted 7 lines
SKX has already been added by commit below in tip/x86/cpu:
commit
d40671e30cb46e834651e0ce3d4590c915171414Author: Dave Hansen <[email protected]> Date: Thu Jun 2 17:19:55 2016 -0700x86, powercap, rapl: Add Skylake Server model number
OK, thanks!
PATCH 2/2 powercap/rapl: reduce warning level
In reply to Jacob PanSince RAPL interface is not architectual, its enumeration depends on poking MSRs instead of using CPUID method.
In KVM guest, RAPL driver probe will fail and emit the following message for every CPU: no valid rapl domains found in package
This patch limit the warning to debug only. Still return ENODEV so that RAPL does not run on KVM guest.
--- drivers/powercap/intel_rapl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/powercap/intel_rapl.c +1 -1
@@ -1324,7 +1324,7 @@ static int rapl_detect_domains(struct rapl_package *rp, int cpu) } rp->nr_domains =bitmap_weight (&rp->domain_map,RAPL_DOMAIN_MAX );if (!rp->nr_domains) { -pr_err ("no valid rapl domains found in package %d\n" , rp->id); +pr_debug ("no valid rapl domains found in package %d\n" , rp->id); ret = -ENODEV ; goto done; }
Signature · 1 line
1.9.1
Rafael J. Wysocki
AppliedRe: [PATCH 2/2] powercap/rapl: reduce warning level
Quoted 10 lines · Jacob Pan
Since RAPL interface is not architectual, its enumeration depends on poking MSRs instead of using CPUID method.
In KVM guest, RAPL driver probe will fail and emit the following message for every CPU: no valid rapl domains found in package
This patch limit the warning to debug only. Still return ENODEV so that RAPL does not run on KVM guest.
Signed-off-by Jacob Pan <[email protected]>
Applied, thanks!