• David Vrabel's avatar
    x86/xen/p2m: hint at the last populated P2M entry · 4e721da3
    David Vrabel authored
    commit 98dd166e upstream.
    
    With commit 633d6f17 (x86/xen: prepare
    p2m list for memory hotplug) the P2M may be sized to accomdate a much
    larger amount of memory than the domain currently has.
    
    When saving a domain, the toolstack must scan all the P2M looking for
    populated pages.  This results in a performance regression due to the
    unnecessary scanning.
    
    Instead of reporting (via shared_info) the maximum possible size of
    the P2M, hint at the last PFN which might be populated.  This hint is
    increased as new leaves are added to the P2M (in the expectation that
    they will be used for populated entries).
    Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
    [ tim.gardner: backport to 4.2-stable ]
    Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
    Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
    4e721da3
p2m.c 27.4 KB