diff options
author | Andrea Arcangeli | 2013-07-25 12:11:15 +0200 |
---|---|---|
committer | Paolo Bonzini | 2013-09-20 12:37:52 +0200 |
commit | 3e469dbfe413c25d48321c3a19ddfae0727dc6e5 (patch) | |
tree | 1705019832b05258e797f85b838435454d4307e4 /target-i386/helper.c | |
parent | Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into st... (diff) | |
download | qemu-3e469dbfe413c25d48321c3a19ddfae0727dc6e5.tar.gz qemu-3e469dbfe413c25d48321c3a19ddfae0727dc6e5.tar.xz qemu-3e469dbfe413c25d48321c3a19ddfae0727dc6e5.zip |
exec: always use MADV_DONTFORK
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 avoid copying the guest
physical address space in the fork child (so we avoid to mark all the
guest memory readonly in the parent and so we skip the establishment
and teardown of lots of pagetables in the child).
In the common case we can ignore the error if MADV_DONTFORK is not
available. Leave a second invocation that errors out in the KVM path
if MMU notifiers are missing and KVM is enabled, to abort in such
case.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Tested-By: Benoit Canet <benoit@irqsave.net>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'target-i386/helper.c')
0 files changed, 0 insertions, 0 deletions