Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-06-02 Thread Alberto Garcia
On Tue 02 Jun 2015 12:56:10 PM CEST, Kevin Wolf wrote: >> > It seems that getpagesize() is usually used in qemu. >> >> The getpagesize() manual page actually recommends using sysconf() for >> portability reasons. But other than that I don't have a problem with >> getpagesize() if it's the preferr

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-06-02 Thread Kevin Wolf
Am 02.06.2015 um 12:50 hat Alberto Garcia geschrieben: > On Tue 02 Jun 2015 12:05:59 PM CEST, Kevin Wolf wrote: > > >> +#include > >> #include "block/block_int.h" > >> #include "qemu-common.h" > >> +#include "qemu/osdep.h" > >> #include "qcow2.h" > >> #include "trace.h" > > > > This breaks t

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-06-02 Thread Alberto Garcia
On Tue 02 Jun 2015 12:05:59 PM CEST, Kevin Wolf wrote: >> +#include >> #include "block/block_int.h" >> #include "qemu-common.h" >> +#include "qemu/osdep.h" >> #include "qcow2.h" >> #include "trace.h" > > This breaks the mingw build: > > /mnt/qemu/block/qcow2-cache.c:25:22: fatal error: sys/m

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-06-02 Thread Kevin Wolf
Am 29.05.2015 um 11:24 hat Alberto Garcia geschrieben: > After having emptied the cache, the data in the cache tables is no > longer useful, so we can tell the kernel that we are done with it. In > Linux this frees the resources associated with it. > > The effect of this can be seen in the HMP com

[Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-29 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it moves data from the top to the base image (and

[Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-27 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it moves data from the top to the base image (and

[Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it moves data from the top to the base image (and

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Max Reitz
On 26.05.2015 17:51, Alberto Garcia wrote: On Tue 26 May 2015 05:39:12 PM CEST, Max Reitz wrote: After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. Looks go

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Alberto Garcia
On Tue 26 May 2015 05:39:12 PM CEST, Max Reitz wrote: >> After having emptied the cache, the data in the cache tables is no >> longer useful, so we can tell the kernel that we are done with it. In >> Linux this frees the resources associated with it. > Looks good, but by applying the same logic,

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Max Reitz
On 18.05.2015 18:48, Alberto Garcia wrote: After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the block-commit operation: it

[Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-18 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the block-commit operation: it moves data from the top to the base image (an