[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/xen: resume timer irqs early



On 07/08/14 18:29, Boris Ostrovsky wrote:
> On 08/07/2014 01:16 PM, David Vrabel wrote:
>> If the timer irqs are resumed during device resume it is possible in
>> certain circumstances for the resume to hang early on, before device
>> interrupts are resumed.
>>
>> It is not entirely clear what is occuring the point of the hang but I
>> think a task necessary for the resume calls schedule_timeout(),
>> waiting for a timer interrupt (which never arrives).  This failure may
>> require specific tasks to be running on the other VCPUs to trigger
>> (processes are not frozen during a suspend/resume if PREEMPT is
>> disabled).
>>
>> Add IRQF_EARLY_RESUME to the timer interrupts so they are resumed in
>> syscore_resume().
>>
>> Also add IRQF_NO_SUSPEND as it is not necessary to suspend the timer
>> interrupts and IRQF_FORCE_RESUME was already set.
> 
> 
> IRQF_NO_SUSPEND is a component of IRQF_TIMER.

So it is.  How about this instead?

8<----------------------------
x86/xen: resume timer irqs early

If the timer irqs are resumed during device resume it is possible in
certain circumstances for the resume to hang early on, before device
interrupts are resumed.

It is not entirely clear what is occuring the point of the hang but I
think a task necessary for the resume calls schedule_timeout(),
waiting for a timer interrupt (which never arrives).  This failure may
require specific tasks to be running on the other VCPUs to trigger
(processes are not frozen during a suspend/resume if PREEMPT is
disabled).

Add IRQF_EARLY_RESUME to the timer interrupts so they are resumed in
syscore_resume().

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
---
 arch/x86/xen/time.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 7b78f88..5718b0b 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -444,7 +444,7 @@ void xen_setup_timer(int cpu)
 
        irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
                                      IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER|
-                                     IRQF_FORCE_RESUME,
+                                     IRQF_FORCE_RESUME|IRQF_EARLY_RESUME,
                                      name, NULL);
        (void)xen_set_irq_priority(irq, XEN_IRQ_PRIORITY_MAX);
 
-- 
1.7.10.4

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.