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] Fix cpu offline bug: cancel SYSIO method when play d

To: Keir Fraser <keir.xen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix cpu offline bug: cancel SYSIO method when play dead
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Fri, 11 Mar 2011 22:35:42 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "Shan, Haitao" <haitao.shan@xxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>, "Yu, Ke" <ke.yu@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Fri, 11 Mar 2011 06:36:25 -0800
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: Acvf+ZmyCoDJPme7R/2YfZzZ86LZaw==
Thread-topic: [PATCH] Fix cpu offline bug: cancel SYSIO method when play dead
Fix cpu offline bug: cancel SYSIO method when play dead

Play dead is a fragile and tricky point of cpu offline logic.
For how to play cpu dead, linux kernel changed several times:
Very old kernel support 3 ways to play cpu dead: mwait, SYSIO, and halt, just 
like what cpuidle did when enter C3;
Later, it cancel mwait and SYSIO support, only use halt to play dead;
Latest linux 2.6.38 add mwait support when cpu dead.

This patch cancel SYSIO method when cpu dead, keep same with latest kernel. 

SYSIO is an obsoleted method to enter deep C, with some tricky hardware 
behavior, and seldom supported in new platform.
Xen experiment indicate that when cpu dead, SYSIO method would trigger unknown 
issue which would bring strange error.
We now cancel SYSIO method when cpu dead, after all, correctness is more 
important than power save, and btw new platform use mwait.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>

diff -r c622e93f69a0 xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c      Thu Mar 10 23:40:52 2022 +0800
+++ b/xen/arch/x86/acpi/cpu_idle.c      Fri Mar 11 03:45:31 2022 +0800
@@ -554,7 +554,6 @@ static void acpi_dead_idle(void)
 {
     struct acpi_processor_power *power;
     struct acpi_processor_cx *cx;
-    int unused;
 
     if ( (power = processor_powers[smp_processor_id()]) == NULL )
         goto default_halt;
@@ -576,10 +575,6 @@ static void acpi_dead_idle(void)
                 /* Not treat interrupt as break event */
                 __monitor((void *)&mwait_wakeup(smp_processor_id()), 0, 0);
                 __mwait(cx->address, 0);
-                break;
-            case ACPI_CSTATE_EM_SYSIO:
-                inb(cx->address);
-                unused = inl(pmtmr_ioport);
                 break;
             default:
                 goto default_halt;

Attachment: cpu_offline_2.patch
Description: cpu_offline_2.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] Fix cpu offline bug: cancel SYSIO method when play dead, Liu, Jinsong <=