]> xenbits.xensource.com Git - xen.git/commit
evtchn: use a per-event channel lock for sending events
authorDavid Vrabel <david.vrabel@citrix.com>
Mon, 22 Jun 2015 09:39:03 +0000 (11:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 22 Jun 2015 09:39:03 +0000 (11:39 +0200)
commitde6acb78bf0e137cbe5b72cee4a35ca018d759cc
tree01fc6ed07c51de03e3159c5d3263c7950bc23e9e
parenta753f0e53ff973a8a066e86c1cb3d6dd5c68d59f
evtchn: use a per-event channel lock for sending events

When sending an event, use a new per-event channel lock to safely
validate the event channel state.

This new lock must be held when changing event channel state.  Note
that the event channel lock must also be held when changing state from
ECS_FREE or it will race with a concurrent get_free_port() call.

To avoid having to take the remote event channel locks when sending to
an interdomain event channel, the local and remote channel locks are
both held when binding or closing an interdomain event channel.

This significantly  increases the  number of events  that can  be sent
from multiple  VCPUs.  But struct  evtchn increases in  size, reducing
the number that fit into a single page to 64 (instead of 128).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/event_channel.c
xen/include/xen/sched.h