WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] CPU Temprature

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] CPU Temprature
From: Ralf Schenk <rs@xxxxxxxxxx>
Date: Mon, 28 Aug 2006 12:45:47 +0200
Delivery-date: Mon, 28 Aug 2006 03:46:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200608281319.26735.caglar@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Databay AG
References: <200608281319.26735.caglar@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)
S.Çağlar Onur schrieb:
> Hi;
> 
> While using xen-3.0.2 with 2.6.16.28 kernel CPU (Intel(R) Pentium(R) M 
> processor 1.73GHz) temprature is inreasing up to 104 C 
> (/proc/acpi/thermal_zone/THRM/trip_points reports 105 C is critical for CPU) 
> while idle or no domU working with very low system load, and if i 
> start to use domU, sometimes system freezes or reboots for heat.
> 
> But the same kernel just without Xen works normally and not causing any heat 
> problem at all (including on high load).
> 
> Both kernels have ACPI and cpufreq support and according to dmesg output and 
> sysfs values both susbsystems seem works without a problem. What can cause 
> this and how can i debug/solve this issue?
> 

Hello !

I've found a patch on the net that solved the problem for my Athlon64
(Venice) System. I use PowerNow to dynamically adjust CPU-Frequencies.

You have to write your own patch for your Centrino based notebook, and
compile the kernel or the kernel Module again. I don't know if there's a
patch for speedstep-centrino.c available anywhere but it is easy to read
the ssource of the powernow-k8 patch an aplly the same to the
speedstep-centrino.c file.

I attach the really small powernow-k8 patch.

-- 
__________________________________________________

Ralf Schenk
fon (02 41) 9 91 21-0
fax (02 41) 9 91 21-59
rs@xxxxxxxxxx

Databay AG
Hüttenstraße 7
D-52068 Aachen
www.databay.de

Sitz/Amtsgericht Aachen
HRB:8437
USt-IdNr.: DE 210844202

Databay - einfach machen.

_________________________________________________

Diese E-Mail und etwa angehängte Dateien enthalten vertrauliche
Informationen und sind ausschließlich für den Adressaten bestimmt.
Sollten Sie irrtümlich diese E-Mail erhalten haben, bitten wir Sie,
uns darüber unter info@xxxxxxxxxx zu informieren und die E-Mail
aus Ihrem System zu löschen.

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
info@xxxxxxxxxxx If you are not the named recipient, you should return
this message and delete it from your system.
--- 
linux-2.6.16-mtyrel-k8-64bit-xen/arch/i386/kernel/cpu/cpufreq/powernow-k8.c~    
    2006-03-28 13:52:05.553985250 -0500
+++ linux-2.6.16-mtyrel-k8-64bit-xen/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 
2006-03-29 18:30:17.260355500 -0500
@@ -48,6 +48,37 @@
 #define VERSION "version 1.60.0"
 #include "powernow-k8.h"
 
+/* Xen support */
+
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
+int xen_access_msr(u32 msr, int write, u32* out1, u32* out2, u32 in1, u32 in2) 
{
+       dom0_op_t op;
+       op.cmd = DOM0_MSR;
+  op.u.msr.write = write;
+  op.u.msr.cpu_mask = 1; /* only first CPU: not clear how to read multiple 
CPUs */
+  op.u.msr.msr = msr;
+  op.u.msr.in1 = in1;
+  op.u.msr.in2 = in2;
+       BUG_ON(HYPERVISOR_dom0_op(&op));
+
+  if (!write) {
+    *out1 = op.u.msr.out1; /* low 32 bits */
+    *out2 = op.u.msr.out2; /* high 32 bits */
+  }
+
+  return 0;
+}
+
+#define cpu_rdmsr(msr, val1, val2) xen_access_msr((msr), 0, &(val1), &(val2), 
0, 0)
+#define cpu_wrmsr(msr, val1, val2) xen_access_msr((msr), 1, NULL, NULL, 
(val1), (val2))
+
+#else
+
+#define cpu_rdmsr(msr, val1, val2) rdmsr(msr, val1, val2)
+#define cpu_wrmsr(msr, val1, val2) wrmsr(msr, val1, val2)
+
+#endif
+
 /* serialize freq changes  */
 static DECLARE_MUTEX(fidvid_sem);
 
@@ -98,7 +129,7 @@
 {
        u32 lo, hi;
 
-       rdmsr(MSR_FIDVID_STATUS, lo, hi);
+       cpu_rdmsr(MSR_FIDVID_STATUS, lo, hi);
        return lo & MSR_S_LO_CHANGE_PENDING ? 1 : 0;
 }
 
@@ -116,7 +147,7 @@
                        dprintk("detected change pending stuck\n");
                        return 1;
                }
-               rdmsr(MSR_FIDVID_STATUS, lo, hi);
+               cpu_rdmsr(MSR_FIDVID_STATUS, lo, hi);
        } while (lo & MSR_S_LO_CHANGE_PENDING);
 
        data->currvid = hi & MSR_S_HI_CURRENT_VID;
@@ -145,13 +176,13 @@
        u32 lo, hi;
        u8 fid, vid;
 
-       rdmsr(MSR_FIDVID_STATUS, lo, hi);
+       cpu_rdmsr(MSR_FIDVID_STATUS, lo, hi);
        vid = hi & MSR_S_HI_CURRENT_VID;
        fid = lo & MSR_S_LO_CURRENT_FID;
        lo = fid | (vid << MSR_C_LO_VID_SHIFT);
        hi = MSR_C_HI_STP_GNT_BENIGN;
        dprintk("cpu%d, init lo 0x%x, hi 0x%x\n", smp_processor_id(), lo, hi);
-       wrmsr(MSR_FIDVID_CTL, lo, hi);
+       cpu_wrmsr(MSR_FIDVID_CTL, lo, hi);
 }
 
 
@@ -173,7 +204,7 @@
                fid, lo, data->plllock * PLL_LOCK_CONVERSION);
 
        do {
-               wrmsr(MSR_FIDVID_CTL, lo, data->plllock * PLL_LOCK_CONVERSION);
+               cpu_wrmsr(MSR_FIDVID_CTL, lo, data->plllock * 
PLL_LOCK_CONVERSION);
                if (i++ > 100) {
                        printk(KERN_ERR PFX "internal error - pending bit very 
stuck - no further pstate changes possible\n");
                        return 1;
@@ -215,7 +246,7 @@
                vid, lo, STOP_GRANT_5NS);
 
        do {
-               wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS);
+               cpu_wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS);
                if (i++ > 100) {
                        printk(KERN_ERR PFX "internal error - pending bit very 
stuck - no further pstate changes possible\n");
                        return 1;
@@ -294,7 +325,7 @@
                smp_processor_id(),
                data->currfid, data->currvid, reqvid, data->rvo);
 
-       rdmsr(MSR_FIDVID_STATUS, lo, maxvid);
+       cpu_rdmsr(MSR_FIDVID_STATUS, lo, maxvid);
        maxvid = 0x1f & (maxvid >> 16);
        dprintk("ph1 maxvid=0x%x\n", maxvid);
        if (reqvid < maxvid) /* lower numbers are higher voltages */
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>