]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 11:43:40 +0000 (03:43 -0800)
commitdcc1309539ebed591e1e28d78f2e512a43140cb8
tree7526721d2652c8a23e4d4441206a8e194dcd81bd
parent57fe7ec66a5f17f2a35142933359bd582618fedb
x86/xen/p2m: hint at the last populated P2M entry

With commit 633d6f17cd91ad5bf2370265946f716e42d388c6 (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+
(cherry picked from commit 98dd166ea3a3c3b57919e20d9b0d1237fcd0349d)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit f80232d154a44edf89dc40a0754dd74628efce34)
arch/x86/xen/p2m.c