Enable 1GB for Xen HVM host page
PATCH 1/4 Enable 1GB for Xen HVM host page
To support 1GB host page, this patch changes the MMIO starting address to 1GB boundary.
# HG changeset patch
# User [email protected]
# Date 1266853444 21600
# Node ID 1d166c5703256ab97225c6ae46ac87dd5bd07e89 # Parent 94e009ef5a58c02d4fe78fcc4c85627b469ee937 change the beginning address of MMIO space to 1GB boundary
xen/include/public/hvm/e820.h +1 -1
@@ -27,7 +27,7 @@#define HVM_E820_NR_OFFSET 0x000001E8#define HVM_E820_OFFSET 0x000002D0 -#define HVM_BELOW_4G_RAM_END 0xF0000000 +#define HVM_BELOW_4G_RAM_END 0xC0000000#define HVM_BELOW_4G_MMIO_START HVM_BELOW_4G_RAM_END#define HVM_BELOW_4G_MMIO_LENGTH ((1ULL << 32) - HVM_BELOW_4G_MMIO_START)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
What's the performance gain from 1GB mappings in HAP tables like? What about just the (possible) extra 1GB mapping from this particular patch? Is it worth making guest-visible efforts like this (admittedly small) one? After all, the probably most frequently accessed 1GB starting at address 0x0 cannot be done with a 1GB mapping and we live with it.
-- Keir
Quoted 6 lines · Wei Huang
To support 1GB host page, this patch changes the MMIO starting address to 1GB boundary.
Signed-off-by Dongxiao Xu <[email protected]>Signed-off-by Wei Huang <[email protected]>
The performance gain depends on applications. We have seen 5% performance improvement for certain benchmarks. But some have no perf. gains over 2MB (no performance degradation either). That is why I add an option to turn it off in case people don't want 1GB.
I didn't have access to my guest QEMU until applying this patch from Dongxiao. Dongxiao might have other comments.
-Wei
-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Tuesday, February 23, 2010 1:57 AM
To: Huang2, Wei; '[email protected]'; Xu, Dongxiao
Subject: Re: [PATCH][1/4] Enable 1GB for Xen HVM host page
What's the performance gain from 1GB mappings in HAP tables like? What about just the (possible) extra 1GB mapping from this particular patch? Is it worth making guest-visible efforts like this (admittedly small) one? After all, the probably most frequently accessed 1GB starting at address 0x0 cannot be done with a 1GB mapping and we live with it.
-- Keir
Quoted 6 lines · Wei Huang
To support 1GB host page, this patch changes the MMIO starting address to 1GB boundary.
Signed-off-by Dongxiao Xu <[email protected]>Signed-off-by Wei Huang <[email protected]>
Quoted 7 lines · Wei
The performance gain depends on applications. We have seen 5% performance improvement for certain benchmarks. But some have no perf. gains over 2MB (no performance degradation either). That is why I add an option to turn it off in case people don't want 1GB.
I didn't have access to my guest QEMU until applying this patch from Dongxiao. Dongxiao might have other comments.
When allocating guest memory without the patch, Xend will treat 3G-4G as normal memory, ignoring the 3.75-4G MMIO hole. This patch modifies MMIO start address to be 1GB aligned and could fix the issue.
Indeed, this patch may have some influence to pure 32bit guest, changing its max memory from 3.75G to 3G.
Anyway, we can change it to alloc 2M pages between 3G and 4G if you think this particular patch is improper.
Thanks!
Dongxiao
Quoted 27 lines
-Wei
-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Tuesday, February 23, 2010 1:57 AM
To: Huang2, Wei; '[email protected]'; Xu, Dongxiao
Subject: Re: [PATCH][1/4] Enable 1GB for Xen HVM host pageWhat's the performance gain from 1GB mappings in HAP tables like? What about
just the (possible) extra 1GB mapping from this particular patch? Is it
worth making guest-visible efforts like this (admittedly small) one? After
all, the probably most frequently accessed 1GB starting at address0x0cannot be done with a 1GB mapping and we live with it.-- Keir
Quoted 5 lines · Wei Huang
To support 1GB host page, this patch changes the MMIO starting address to 1GB boundary.
Signed-off-by Dongxiao Xu <[email protected]>Signed-off-by Wei Huang <[email protected]>
Quoted 9 lines · Dongxiao
When allocating guest memory without the patch, Xend will treat 3G-4G as normal memory, ignoring the 3.75-4G MMIO hole. This patch modifies MMIO start address to be 1GB aligned and could fix the issue.
Indeed, this patch may have some influence to pure 32bit guest, changing its max memory from 3.75G to 3G.
Anyway, we can change it to alloc 2M pages between 3G and 4G if you think this particular patch is improper.
I would expect it to fall back to 2MB extents, and from there back to 4kB extents as necessary, for any range where: (a) the range to be allocated for is not 1GB-sized and -aligned; or (b) no 1GB extents are available from Xen's free pool.
-- Keir