[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage |
Date: |
Fri, 17 Oct 2014 09:33:58 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Oct 17, 2014 at 04:27:17PM +0800, address@hidden wrote:
> From: linhaifeng <address@hidden>
>
> 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 should close all shared fd when exit.
>
> Signed-off-by: linhaifeng <address@hidden>
Err, all file descriptors are closed automatically when a process
exits. So manually calling close(fd) before exit can't have any
functional effect on a resource leak.
If QEMU has sent the FD to another process, that process has a
completely separate copy of the FD. Closing the FD in QEMU will
not close the FD in the other process. You need the other process
to exit for the copy to be closed.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
- [Qemu-devel] [PATCH] fix the memory leak for share hugepage, haifeng.lin, 2014/10/17
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage,
Daniel P. Berrange <=
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Gonglei, 2014/10/17
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Linhaifeng, 2014/10/17
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Linhaifeng, 2014/10/17
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Daniel P. Berrange, 2014/10/17
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Linhaifeng, 2014/10/17
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Wen Congyang, 2014/10/19
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Linhaifeng, 2014/10/20
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Wen Congyang, 2014/10/20
- Re: [Qemu-devel] [PATCH] fix the memory leak for share hugepage, Linhaifeng, 2014/10/20