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


Groups > linux.kernel > #1196072 > unrolled thread

[PATCH] intel_rapl: downgrade message if no RAPL domains found in a VM

Started byPaolo Bonzini <pbonzini@redhat.com>
First post2015-07-30 16:20 +0200
Last post2015-07-30 16:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] intel_rapl: downgrade message if no RAPL domains found in a VM Paolo Bonzini <pbonzini@redhat.com> - 2015-07-30 16:20 +0200

#1196072 — [PATCH] intel_rapl: downgrade message if no RAPL domains found in a VM

FromPaolo Bonzini <pbonzini@redhat.com>
Date2015-07-30 16:20 +0200
Subject[PATCH] intel_rapl: downgrade message if no RAPL domains found in a VM
Message-ID<pRWQF-Mx-13@gated-at.bofh.it>
People complain about the driver saying there's no valid RAPL domains
in a VM, and doing so at KERN_ERR severity.  Downgrade this to KERN_INFO
if running on a hypervisor, since it is basically stating the obvious.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 drivers/powercap/intel_rapl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index 482b22ddc7b2..a418076dc9c9 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -1320,7 +1320,9 @@ 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);
+		printk("%sNo valid RAPL domains found in package %d\n",
+		       boot_cpu_has(X86_FEATURE_HYPERVISOR) ? KERN_INFO : KERN_ERR,
+		       rp->id);
 		ret = -ENODEV;
 		goto done;
 	}
-- 
1.8.3.1

--
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] | [standalone]


Back to top | Article view | linux.kernel


csiph-web