Re: [Qemu-devel] [PATCH v1 07/17] background snapshot: introduce page buffer

2018-07-20 Thread Paolo Bonzini
On 18/07/2018 17:41, Denis Plotnikov wrote: > +static void ram_page_buffer_decrease_used(void) > +{ > +qemu_event_reset(_state->page_buffer.used_decreased); > +atomic_dec(_state->page_buffer.used); > +qemu_event_set(_state->page_buffer.used_decreased); As Peter noted, only the

Re: [Qemu-devel] [PATCH v1 07/17] background snapshot: introduce page buffer

2018-07-20 Thread Peter Xu
On Wed, Jul 18, 2018 at 06:41:50PM +0300, Denis Plotnikov wrote: > To limit the amount of memory used by the background snapshot > a memory limiter is used which called "page buffer". > In fact, it's a memory page counter limiting the page allocation. > Currently, the limit of pages is hardcoded

[Qemu-devel] [PATCH v1 07/17] background snapshot: introduce page buffer

2018-07-18 Thread Denis Plotnikov
To limit the amount of memory used by the background snapshot a memory limiter is used which called "page buffer". In fact, it's a memory page counter limiting the page allocation. Currently, the limit of pages is hardcoded but its setter is the matter of the future work. The background snapshot