aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/mm.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-09-22 08:18:19 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-09-22 08:18:19 +0100
commit73f0173619a0017225fc185ed1a96a1a47a8a0c3 (patch)
tree1945ed1c64da29298248b7aa3e6fcaf2a1dafa54 /xen/include/asm-x86/mm.h
parentbac2000063ba239d33b631f6edda48cc6b57425b (diff)
downloadxen-73f0173619a0017225fc185ed1a96a1a47a8a0c3.tar.gz
xen-73f0173619a0017225fc185ed1a96a1a47a8a0c3.tar.bz2
xen-73f0173619a0017225fc185ed1a96a1a47a8a0c3.zip
x86: map frame table sparsely
Avoid backing frame table holes with memory, when those holes are large enough to cover an exact multiple of large pages. This is based on the introduction of a bit map, where each bit represents one such range, thus allowing mfn_valid() checks to easily filter out those MFNs that now shouldn't be used to index the frame table. This allows for saving a couple of 2M pages even on "normal" systems. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/asm-x86/mm.h')
-rw-r--r--xen/include/asm-x86/mm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index f8c1e01313..c569573446 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -263,6 +263,10 @@ extern unsigned long max_page;
extern unsigned long total_pages;
void init_frametable(void);
+#define PDX_GROUP_COUNT ((1 << L2_PAGETABLE_SHIFT) / \
+ (sizeof(*frame_table) & -sizeof(*frame_table)))
+extern unsigned long pdx_group_valid[];
+
/* Convert between Xen-heap virtual addresses and page-info structures. */
static inline struct page_info *__virt_to_page(const void *v)
{