Skip to content

Commit

Permalink
xen: handle events as edge-triggered
Browse files Browse the repository at this point in the history
Xen events are logically edge triggered, as Xen only calls the event
upcall when an event is newly set, but not continuously as it remains set.
As a result, use handle_edge_irq rather than handle_level_irq.

This has the important side-effect of fixing a long-standing bug of
events getting lost if:
 - an event's interrupt handler is running
 - the event is migrated to a different vcpu
 - the event is re-triggered

The most noticable symptom of these lost events is occasional lockups
of blkfront.

Many thanks to Tom Kopec and Daniel Stodden in tracking this down.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Tom Kopec <tek@acm.org>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
  • Loading branch information
Jeremy Fitzhardinge committed Aug 24, 2010
1 parent aaca496 commit dffe2e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ int bind_evtchn_to_irq(unsigned int evtchn)
irq = find_unbound_irq();

set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
handle_level_irq, "event");
handle_edge_irq, "event");

evtchn_to_irq[evtchn] = irq;
irq_info[irq] = mk_evtchn_info(evtchn);
Expand Down

0 comments on commit dffe2e1

Please sign in to comment.