]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/p2m: Reuse existing P2M leafs if they are filled with 1:1 PFNs or INVALID.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 17 Aug 2012 13:27:35 +0000 (09:27 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 17 Aug 2012 14:24:48 +0000 (10:24 -0400)
commit62fe74b8515f9b37fc6ed7425d035fe14c94d17c
treeef112b7728656feb1fc222f356ee57c08144dc55
parente07cb43109b80a7c06c6fd68e0e2152fa619a893
xen/p2m: Reuse existing P2M leafs if they are filled with 1:1 PFNs or INVALID.

If P2M leaf is completly packed with INVALID_P2M_ENTRY or with
1:1 PFNs (so IDENTITY_FRAME type PFNs), we can swap the P2M leaf
with either a p2m_missing or p2m_identity respectively. The old
page (which was created via extend_brk or was grafted on from the
mfn_list) can be re-used for setting new PFNs.

This also means we can remove git commit:
5bc6f9888db5739abfa0cae279b4b442e4db8049
xen/p2m: Reserve 8MB of _brk space for P2M leafs when populating back
which tried to fix this.

and make the amount that is required to be reserved much smaller.

CC: stable@vger.kernel.org # for 3.5 only.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/p2m.c