Re: [Qemu-devel] [PATCH v2 3/3] hostmem-file: Add "discard-data" option

2017-08-29 Thread Eduardo Habkost
On Tue, Aug 29, 2017 at 12:13:45PM +0100, Daniel P. Berrange wrote: > On Thu, Aug 24, 2017 at 04:23:15PM -0300, Eduardo Habkost wrote: > > The new option can be used to indicate that the file contents can > > be destroyed and don't need to be flushed to disk when QEMU exits > > or when the memory b

Re: [Qemu-devel] [PATCH v2 3/3] hostmem-file: Add "discard-data" option

2017-08-29 Thread Daniel P. Berrange
On Thu, Aug 24, 2017 at 04:23:15PM -0300, Eduardo Habkost wrote: > The new option can be used to indicate that the file contents can > be destroyed and don't need to be flushed to disk when QEMU exits > or when the memory backend object is removed. > > Internally, it will trigger a madvise(MADV_RE

[Qemu-devel] [PATCH v2 3/3] hostmem-file: Add "discard-data" option

2017-08-24 Thread Eduardo Habkost
The new option can be used to indicate that the file contents can be destroyed and don't need to be flushed to disk when QEMU exits or when the memory backend object is removed. Internally, it will trigger a madvise(MADV_REMOVE) call when the memory backend is removed. Signed-off-by: Eduardo Habk