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-devel

[Xen-devel] [PATCH]Dom0: Fix for throttling while pr->id == -1

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]Dom0: Fix for throttling while pr->id == -1
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Tue, 28 Oct 2008 10:19:12 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 27 Oct 2008 19:19:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack4o5FG8hb8x3FiQsGKSWpkO5jJ9g==
Thread-topic: [PATCH]Dom0: Fix for throttling while pr->id == -1
Fix for throttling while pr->id == -1

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>

diff -r f40f4f86d5a2 drivers/acpi/processor_core.c
--- a/drivers/acpi/processor_core.c     Mon Oct 27 13:47:07 2008 +0000
+++ b/drivers/acpi/processor_core.c     Tue Oct 28 10:27:01 2008 +0800
@@ -513,8 +513,17 @@ static int acpi_processor_get_info(struc
 #if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
        acpi_processor_ppc_has_changed(pr);
 #endif
-       acpi_processor_get_throttling_info(pr);
-       acpi_processor_get_limit_info(pr);
+
+       /* 
+        * pr->id may equal to -1 while processor_cntl_external enabled.
+        * throttle and thermal module don't support this case.
+        * Tx only works when dom0 vcpu == pcpu num by far, as we give 
+        * control to dom0.
+        */
+       if (pr->id != -1) {
+               acpi_processor_get_throttling_info(pr);
+               acpi_processor_get_limit_info(pr);
+       }
 
        return 0;
 }

Jimmy

Attachment: throttling-fix.patch
Description: throttling-fix.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]Dom0: Fix for throttling while pr->id == -1, Wei, Gang <=