From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] xenpaging:close domU's event channel and free port Date: Fri, 10 Feb 2012 17:40:10 +0100 Message-ID: <20120210164010.GA10009@aepfle.de> References: <9f4640e40d4f31563885.1328777634@h00166998.china.huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <9f4640e40d4f31563885.1328777634@h00166998.china.huawei.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: hongkaixing@huawei.com Cc: bicky.shi@huawei.com, xiaowei.yang@huawei.com, xen-devel@lists.xensource.com, yanqiangjun@huawei.com, hanweidong@huawei.com List-Id: xen-devel@lists.xenproject.org On Thu, Feb 09, hongkaixing@huawei.com wrote: > xenpaging:close domU's event channel and free port > > Every domain (X86 64 bit)has 4096 event channels.In source code, > domU's event channel is allocated in mem_event_enable(),but just > unbind dom0's event channel in xenpaging_teardown().This bug will > result in that we can not use xenpaging after reopening it for 4096 > times.We should free domU's event channel in mem_event_disable().so > that we can reuse the port. Does that fix a real bug? xenpaging_teardown() does both xc_mem_paging_disable() and xc_evtchn_unbind(). The former fails often because the domain is gone and so it doesnt even reach the function in mem_event.c. The latter is called unconditionally. Also I would expect that once xenpaging exits the kernel driver does a cleanup of all used ports. I havent checked wether thats true. Olaf