Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration: drop MADVISE_DONT_NEED for incoming zero pages
The madvise for zeroed out pages was introduced when every transferred zero page was memset to zero and thus allocated. Since commit 211ea74 we check for zeroness of a target page before we memset it to zero. Additionally we memmap target memory so it is essentially zero initialized (except for e.g. option roms and bios which are loaded into target memory although they shouldn't). It was reported recently that this madvise causes a performance degradation in some situations. As the madvise should only be called rarely and if it's called it is likely on a busy page (it was non-zero and changed to zero during migration) drop it completely. Reported-By: Zhang Haoyu <[email protected]> Acked-by: Paolo Bonzini <[email protected]> Signed-off-by: Peter Lieven <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
- Loading branch information