]> git.baikalelectronics.ru Git - kernel.git/commit
x86/xen/p2m: hint at the last populated P2M entry
authorDavid Vrabel <david.vrabel@citrix.com>
Mon, 7 Sep 2015 16:14:08 +0000 (17:14 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Tue, 6 Oct 2015 12:54:20 +0000 (13:54 +0100)
commit94bf293192972417601985cae933fc3c1478e940
tree51b3b999b061f20b92cbd8b8eb8bf1695fb35838
parentcf0f01b6e1220fd1966dd01c76aa8c21898e4065
x86/xen/p2m: hint at the last populated P2M entry

With commit e79a94527c031e5417ac8425bc9fa485dc1d5b0b (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: David Vrabel <david.vrabel@citrix.com>
Cc: <stable@vger.kernel.org> # 4.0+
arch/x86/xen/p2m.c