xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/xen: resume timer irqs early
@ 2014-08-07 17:16 David Vrabel
  2014-08-07 17:29 ` Boris Ostrovsky
  0 siblings, 1 reply; 7+ messages in thread
From: David Vrabel @ 2014-08-07 17:16 UTC (permalink / raw)
  To: xen-devel; +Cc: Boris Ostrovsky, David Vrabel

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.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
 arch/x86/xen/time.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 7b78f88..90dd311 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -443,8 +443,10 @@ void xen_setup_timer(int cpu)
 		name = "<timer kasprintf failed>";
 
 	irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
-				      IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER|
-				      IRQF_FORCE_RESUME,
+				      IRQF_PERCPU | IRQF_NOBALANCING
+				      | IRQF_TIMER
+				      | IRQF_NO_SUSPEND | IRQF_FORCE_RESUME
+				      | IRQF_EARLY_RESUME,
 				      name, NULL);
 	(void)xen_set_irq_priority(irq, XEN_IRQ_PRIORITY_MAX);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-08 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-07 17:16 [PATCH] x86/xen: resume timer irqs early David Vrabel
2014-08-07 17:29 ` Boris Ostrovsky
2014-08-08 10:41   ` David Vrabel
2014-08-08 14:04     ` Boris Ostrovsky
2014-08-08 14:35       ` David Vrabel
2014-08-08 17:15         ` Konrad Rzeszutek Wilk
2014-08-08 17:38           ` David Vrabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).