|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/6] libxl: events: Deregister evtchn fd when not needed
Ian Campbell writes ("Re: [PATCH 5/6] libxl: events: Deregister evtchn fd when
not needed"):
> On Thu, 2014-11-27 at 18:27 +0000, Ian Jackson wrote:
> > We want to have no fd events registered when we are idle.
> > In this patch, deal with the evtchn fd:
> >
> > * Defer setup of the evtchn handle to the first use.
> > * Defer registration of the evtchn fd; register as needed on use.
> > * When cancelling an evtchn wait, or when wait setup fails, check
> > whether there are now no evtchn waits and if so deregister the fd.
> > * On libxl teardown, the evtchn fd should therefore be unregistered.
> > assert that this is the case.
>
> Is there no locking required when registering/deregistering? Since there
> are list manipulations in most of these places I presume it already
> exists, but I thought I should check.
libxl__ev_evtchn_* is always called with the ctx lock held.
However, that they don't take the lock is contrary to the rules stated
for libxl__ev_* in the doc comment. That should be fixed for 4.6.
libxl__ev_fd_* already take and release the lock to protect their own
data structures etc.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |