• W
    kvm: mmu: lazy collapse small sptes into large sptes · 3ea3b7fa
    Wanpeng Li 提交于
    Dirty logging tracks sptes in 4k granularity, meaning that large sptes
    have to be split.  If live migration is successful, the guest in the
    source machine will be destroyed and large sptes will be created in the
    destination. However, the guest continues to run in the source machine
    (for example if live migration fails), small sptes will remain around
    and cause bad performance.
    
    This patch introduce lazy collapsing of small sptes into large sptes.
    The rmap will be scanned in ioctl context when dirty logging is stopped,
    dropping those sptes which can be collapsed into a single large-page spte.
    Later page faults will create the large-page sptes.
    Reviewed-by: NXiao Guangrong <guangrong.xiao@linux.intel.com>
    Signed-off-by: NWanpeng Li <wanpeng.li@linux.intel.com>
    Message-Id: <1428046825-6905-1-git-send-email-wanpeng.li@linux.intel.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    3ea3b7fa
x86.c 201.1 KB