]> git.proxmox.com Git - qemu.git/commit
migration: drop MADVISE_DONT_NEED for incoming zero pages
authorPeter Lieven <pl@kamp.de>
Thu, 24 Oct 2013 07:21:29 +0000 (09:21 +0200)
committerJuan Quintela <quintela@redhat.com>
Tue, 19 Nov 2013 16:23:57 +0000 (17:23 +0100)
commitfc1c4a5d32e15a4c40c47945da85ef9c1e0c1b54
tree29b83122d96f514137440567ad92c38cacf2c2cc
parent5c5432e7d630592ddcc1876ac8a1505f8f14ef15
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
211ea740 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 <haoyu.zhang@huawei.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
arch_init.c