Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-20 Thread Linhaifeng
On 2014/10/20 13:32, Wen Congyang wrote: On 10/20/2014 12:48 PM, Linhaifeng wrote: On 2014/10/20 10:12, Wen Congyang wrote: On 10/18/2014 11:20 AM, Linhaifeng wrote: On 2014/10/17 21:26, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:57:27PM +0800, Linhaifeng wrote: On

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-20 Thread Wen Congyang
On 10/20/2014 02:17 PM, Linhaifeng wrote: On 2014/10/20 13:32, Wen Congyang wrote: On 10/20/2014 12:48 PM, Linhaifeng wrote: On 2014/10/20 10:12, Wen Congyang wrote: On 10/18/2014 11:20 AM, Linhaifeng wrote: On 2014/10/17 21:26, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-20 Thread Linhaifeng
Hi,all Maybe this is unix domain socket's bug.I found that qemu send the fd to vapp the fd's f_count inc twice in kernel. 1.kernel calls when we call send. unix_stream_sendmsg - unix_scm_to_skb - unix_attach_fds - scm_fp_dup - get_file - atomic_long_inc(f-f_count) Maybe should't inc the

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-20 Thread Daniel P. Berrange
On Sat, Oct 18, 2014 at 11:20:13AM +0800, Linhaifeng wrote: On 2014/10/17 21:26, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:57:27PM +0800, Linhaifeng wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-19 Thread Wen Congyang
On 10/18/2014 11:20 AM, Linhaifeng wrote: On 2014/10/17 21:26, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:57:27PM +0800, Linhaifeng wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-19 Thread Linhaifeng
On 2014/10/20 10:12, Wen Congyang wrote: On 10/18/2014 11:20 AM, Linhaifeng wrote: On 2014/10/17 21:26, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:57:27PM +0800, Linhaifeng wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800,

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-19 Thread Wen Congyang
On 10/20/2014 12:48 PM, Linhaifeng wrote: On 2014/10/20 10:12, Wen Congyang wrote: On 10/18/2014 11:20 AM, Linhaifeng wrote: On 2014/10/17 21:26, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:57:27PM +0800, Linhaifeng wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On

[Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread haifeng.lin
From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the hugepage fd may be send to other process e.g vhost-user If qemu not close the fd the other process can not free the hugepage otherwise exit process,this is ugly,so qemu

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Daniel P. Berrange
On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the hugepage fd may be send to other process e.g vhost-user If qemu not close the fd the other

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread zhanghailiang
On 2014/10/17 16:27, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the hugepage fd may be send to other process e.g vhost-user If qemu not close the fd the other process can not free the

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Linhaifeng
On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the hugepage fd may be send to other process e.g

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Gonglei
On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the hugepage fd may be send to other process e.g

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Linhaifeng
On 2014/10/17 16:56, Gonglei wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the hugepage

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Linhaifeng
On 2014/10/17 16:57, Linhaifeng wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Daniel P. Berrange
On Fri, Oct 17, 2014 at 04:57:27PM +0800, Linhaifeng wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Linhaifeng
On 2014/10/17 21:26, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:57:27PM +0800, Linhaifeng wrote: On 2014/10/17 16:33, Daniel P. Berrange wrote: On Fri, Oct 17, 2014 at 04:27:17PM +0800, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with

Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage

2014-10-17 Thread Linhaifeng
On 2014/10/17 16:43, zhanghailiang wrote: On 2014/10/17 16:27, haifeng@huawei.com wrote: From: linhaifeng haifeng@huawei.com The VM start with share hugepage should close the hugefile fd when exit.Because the hugepage fd may be send to other process e.g vhost-user If qemu not close