Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-26 Thread Ian Jackson
Wei Liu writes ("Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction"): > On Mon, Feb 12, 2018 at 03:24:26PM +, Julien Grall wrote: > > In any case, the worst that could happen is the unmap is called twice on the >

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-14 Thread Wei Liu
On Mon, Feb 12, 2018 at 03:24:26PM +, Julien Grall wrote: > > > On 12/02/18 15:17, Zhongze Liu wrote: > > Hi Julien, > > Hi, > > > > > 2018-02-12 23:09 GMT+08:00 Julien Grall : > > > Hi, > > > > > > On 12/02/18 14:52, Zhongze Liu wrote: > > > > > > > > 2018-02-08 0:54 GMT+08:00 Julien Gr

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-14 Thread Wei Liu
On Mon, Feb 12, 2018 at 03:24:26PM +, Julien Grall wrote: > > > On 12/02/18 15:17, Zhongze Liu wrote: > > Hi Julien, > > Hi, > > > > > 2018-02-12 23:09 GMT+08:00 Julien Grall : > > > Hi, > > > > > > On 12/02/18 14:52, Zhongze Liu wrote: > > > > > > > > 2018-02-08 0:54 GMT+08:00 Julien Gr

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-12 Thread Julien Grall
On 12/02/18 15:17, Zhongze Liu wrote: Hi Julien, Hi, 2018-02-12 23:09 GMT+08:00 Julien Grall : Hi, On 12/02/18 14:52, Zhongze Liu wrote: 2018-02-08 0:54 GMT+08:00 Julien Grall : On 07/02/18 16:27, Zhongze Liu wrote: It seems that I mistakenly use transaction as a global lock. Now I

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-12 Thread Zhongze Liu
Hi Julien, 2018-02-12 23:09 GMT+08:00 Julien Grall : > Hi, > > On 12/02/18 14:52, Zhongze Liu wrote: >> >> 2018-02-08 0:54 GMT+08:00 Julien Grall : >>> >>> On 07/02/18 16:27, Zhongze Liu wrote: >> >> It seems that I mistakenly use transaction as a global lock. Now I don't >> have >> any reasons no

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-12 Thread Julien Grall
Hi, On 12/02/18 14:52, Zhongze Liu wrote: 2018-02-08 0:54 GMT+08:00 Julien Grall : On 07/02/18 16:27, Zhongze Liu wrote: It seems that I mistakenly use transaction as a global lock. Now I don't have any reasons not putting the unmap out of the transaction, but this will break the original tran

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-12 Thread Zhongze Liu
Hi Julien an Wei, 2018-02-08 0:54 GMT+08:00 Julien Grall : > On 07/02/18 16:27, Zhongze Liu wrote: >> >> Hi Wei and Julien, > > > Hi, > > >> 2018-02-07 2:06 GMT+08:00 Wei Liu : >>> >>> On Tue, Feb 06, 2018 at 01:24:30PM +, Julien Grall wrote: > >if (libxl__device_pci_destroy_al

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-07 Thread Julien Grall
On 07/02/18 16:27, Zhongze Liu wrote: Hi Wei and Julien, Hi, 2018-02-07 2:06 GMT+08:00 Wei Liu : On Tue, Feb 06, 2018 at 01:24:30PM +, Julien Grall wrote: if (libxl__device_pci_destroy_all(gc, domid) < 0) LOGD(ERROR, domid, "Pci shutdown failed"); rc = xc_domain

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-07 Thread Zhongze Liu
Hi Wei and Julien, 2018-02-07 2:06 GMT+08:00 Wei Liu : > On Tue, Feb 06, 2018 at 01:24:30PM +, Julien Grall wrote: >> > if (libxl__device_pci_destroy_all(gc, domid) < 0) >> > LOGD(ERROR, domid, "Pci shutdown failed"); >> > rc = xc_domain_pause(ctx->xch, domid); >> > diff

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-06 Thread Wei Liu
On Tue, Feb 06, 2018 at 01:24:30PM +, Julien Grall wrote: > > if (libxl__device_pci_destroy_all(gc, domid) < 0) > > LOGD(ERROR, domid, "Pci shutdown failed"); > > rc = xc_domain_pause(ctx->xch, domid); > > diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_inter

Re: [Xen-devel] [PATCH v4 5/7] libxl: support unmapping static shared memory areas during domain destruction

2018-02-06 Thread Julien Grall
Hi, On 01/30/2018 05:50 PM, Zhongze Liu wrote: Add libxl__sshm_del to unmap static shared memory areas mapped by libxl__sshm_add during domain creation. The unmapping process is: * For a master: decrease the refcount of the sshm region, if the refcount reaches 0, cleanup the whole sshm path.