Preallocate -mem-path memory by default
commit2f26d02b783a2fcada25ba7b87a8b67884e98df8
authorjohn cooper <john.cooper@redhat.com>
Tue, 27 Jan 2009 20:43:03 +0000 (27 18:43 -0200)
committerAvi Kivity <avi@redhat.com>
Tue, 3 Feb 2009 12:37:44 +0000 (3 14:37 +0200)
tree8a4ab94b3dcb1cc68d1264cdaf72dd6a3c709eca
parentdacb716cd8be94a05e548a3be75cb21e304f4f9a
Preallocate -mem-path memory by default

Attached is a patch to qemu which adds an option to preallocate of huge
pages at startup time, making it the default.

The motivation for this arose from odd behavior seen in qemu when access
to huge page backed phys_mem failed during startup (eg: loading the
bios), and during runtime where a guest will terminate via signal if a
free hpage isn't available to satisfy a guest page fault.

This is believed to be an interim solution until proper huge page
support is available from within the kernel+kvm, ideally allowing
fallback to 4K pages on a dynamic basis and ultimately allowing huge
pages faults to reclaim huge pages from other users in the system.

Signed-off-by: john cooper <john.cooper@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
vl.c