From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 5/6] libxl: events: Deregister evtchn fd when not needed Date: Tue, 9 Dec 2014 15:56:58 +0000 Message-ID: <1418140618.19809.15.camel@citrix.com> References: <1417112870-31894-1-git-send-email-ian.jackson@eu.citrix.com> <1418140489-21196-1-git-send-email-ian.jackson@eu.citrix.com> <1418140489-21196-6-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1418140489-21196-6-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Jim Fehlig , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-12-09 at 15:54 +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. > > Signed-off-by: Ian Jackson > Release-Acked-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell