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] Re: [PATCH]x86: Fix possible S3 suspend hangs

To: "Wei, Gang" <gang.wei@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH]x86: Fix possible S3 suspend hangs
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 12 Mar 2010 07:28:55 +0000
Cc: "Yu, Ke" <ke.yu@xxxxxxxxx>
Delivery-date: Thu, 11 Mar 2010 23:29:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C7BF9BA3.D1CD%keir.fraser@xxxxxxxxxxxxx>
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: AcrBlf9043FPUcdKRIuVj4pFG/hDbQAHm9OmAABPRnc=
Thread-topic: [PATCH]x86: Fix possible S3 suspend hangs
User-agent: Microsoft-Entourage/12.23.0.091001
Oh, don't worry about it. It's more obvious than I first thought!

 -- Keir

On 12/03/2010 07:20, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

> Not doubting this race exists, but could you briefly give an example of an
> offlining scenario that would hit the hang? And explain the result: is it
> that the offliner thinks the operation doesn't complete and spins forever in
> __cpu_die()?
> 
>  -- Keir
> 
> On 12/03/2010 03:42, "Wei, Gang" <gang.wei@xxxxxxxxx> wrote:
> 
>> X86: Fix possible S3 suspend hangs
>> 
>> It is possible for cpu to become offlined before irq disabled in idle loop,
>> which will cause this cpu stay in C state and can't wakeup to play dead.
>> 
>> Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
>> Signed-off-by: Yu Ke <ke.yu@xxxxxxxxx>
>> 
>> diff -r 132ac04cbdba xen/arch/x86/acpi/cpu_idle.c
>> --- a/xen/arch/x86/acpi/cpu_idle.c Tue Mar 09 18:18:19 2010 +0000
>> +++ b/xen/arch/x86/acpi/cpu_idle.c Fri Mar 12 11:07:43 2010 +0800
>> @@ -268,7 +268,8 @@ static void acpi_processor_idle(void)
>>       */
>>      local_irq_disable();
>>  
>> -    if ( softirq_pending(smp_processor_id()) )
>> +    if ( softirq_pending(smp_processor_id()) ||
>> +         cpu_is_offline(smp_processor_id()) )
>>      {
>>          local_irq_enable();
>>          sched_tick_resume();
>> diff -r 132ac04cbdba xen/arch/x86/domain.c
>> --- a/xen/arch/x86/domain.c Tue Mar 09 18:18:19 2010 +0000
>> +++ b/xen/arch/x86/domain.c Fri Mar 12 11:12:24 2010 +0800
>> @@ -82,7 +82,8 @@ static void default_idle(void)
>>  static void default_idle(void)
>>  {
>>      local_irq_disable();
>> -    if ( !softirq_pending(smp_processor_id()) )
>> +    if ( !softirq_pending(smp_processor_id()) &&
>> +         cpu_online(smp_processor_id()) )
>>          safe_halt();
>>      else
>>          local_irq_enable();
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>