Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-09-01 Thread Gleb Natapov
On Thu, Jul 25, 2013 at 12:11:15PM +0200, Andrea Arcangeli wrote: > MADV_DONTFORK prevents fork to fail with -ENOMEM if the default > overcommit heuristics decides there's too much anonymous virtual > memory allocated. If the KVM secondary MMU is synchronized with MMU > notifiers or not, doesn't ma

Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-08-30 Thread Paolo Bonzini
Il 06/08/2013 18:55, Andreas Färber ha scritto: > Am 25.07.2013 12:32, schrieb Andrea Arcangeli: >> On Thu, Jul 25, 2013 at 11:16:44AM +0100, Peter Maydell wrote: >>> On 25 July 2013 11:11, Andrea Arcangeli wrote: diff --git a/exec.c b/exec.c index c99a883..d3bb58d 100644 --- a/exec

Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-08-06 Thread Benoît Canet
Le Thursday 25 Jul 2013 à 12:11:15 (+0200), Andrea Arcangeli a écrit : > MADV_DONTFORK prevents fork to fail with -ENOMEM if the default > overcommit heuristics decides there's too much anonymous virtual > memory allocated. If the KVM secondary MMU is synchronized with MMU > notifiers or not, doesn

Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-08-06 Thread Andreas Färber
Am 25.07.2013 12:32, schrieb Andrea Arcangeli: > On Thu, Jul 25, 2013 at 11:16:44AM +0100, Peter Maydell wrote: >> On 25 July 2013 11:11, Andrea Arcangeli wrote: >>> diff --git a/exec.c b/exec.c >>> index c99a883..d3bb58d 100644 >>> --- a/exec.c >>> +++ b/exec.c >>> @@ -1162,6 +1162,7 @@ ram_addr_

Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-07-25 Thread Andrea Arcangeli
On Thu, Jul 25, 2013 at 11:16:44AM +0100, Peter Maydell wrote: > On 25 July 2013 11:11, Andrea Arcangeli wrote: > > diff --git a/exec.c b/exec.c > > index c99a883..d3bb58d 100644 > > --- a/exec.c > > +++ b/exec.c > > @@ -1162,6 +1162,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, > > vo

Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-07-25 Thread Peter Maydell
On 25 July 2013 11:11, Andrea Arcangeli wrote: > diff --git a/exec.c b/exec.c > index c99a883..d3bb58d 100644 > --- a/exec.c > +++ b/exec.c > @@ -1162,6 +1162,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, > void *host, > > qemu_ram_setup_dump(new_block->host, size); > qemu_ma

[Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-07-25 Thread Andrea Arcangeli
MADV_DONTFORK prevents fork to fail with -ENOMEM if the default overcommit heuristics decides there's too much anonymous virtual memory allocated. If the KVM secondary MMU is synchronized with MMU notifiers or not, doesn't make a difference in that regard. Secondly it's always more efficient to av