]> git.proxmox.com Git - mirror_qemu.git/commit
Assume madvise for (no)hugepage works
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 19 Nov 2015 15:27:48 +0000 (15:27 +0000)
committerJuan Quintela <quintela@redhat.com>
Wed, 25 Nov 2015 14:27:28 +0000 (15:27 +0100)
commit1d7414396f926651c4d7a673eb3a10aca5246d76
treeff3b04ca4e3cc6bf195bd0422cb0147f802117c7
parente85dda8070b20dd8765d52daf64de70a9ccf395f
Assume madvise for (no)hugepage works

madvise() returns EINVAL in the case of many failures, but also
returns it in cases where the host kernel doesn't have THP enabled.
Postcopy only really cares that THP is off before it detects faults,
and turns it back on afterwards; so we're going to have
to assume that if the madvise fails then the host just doesn't do
THP and we can carry on with the postcopy.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/postcopy-ram.c