]> git.proxmox.com Git - mirror_qemu.git/commit
migration/ram: Optimize ram_save_host_page()
authorKunkun Jiang <jiangkunkun@huawei.com>
Tue, 16 Mar 2021 12:57:16 +0000 (20:57 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 13 May 2021 17:21:13 +0000 (18:21 +0100)
commitba1b7c812c1efa49f9c297b6a22c598ff0eb5a4b
tree2e2af203529ac74af5ca61cf7425943441b49cc2
parent23feba906e42747463aa233fb54c58d7f02430c9
migration/ram: Optimize ram_save_host_page()

Starting from pss->page, ram_save_host_page() will check every page
and send the dirty pages up to the end of the current host page or
the boundary of used_length of the block. If the host page size is
a huge page, the step "check" will take a lot of time.

It will improve performance to use migration_bitmap_find_dirty().

Tested on Kunpeng 920; VM parameters: 1U 4G (page size 1G)
The time of ram_save_host_page() in the last round of ram saving:
before optimize: 9250us after optimize: 34us

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210316125716.1243-3-jiangkunkun@huawei.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/ram.c