Message ID | 1503629540-26053-2-git-send-email-tianyu.lan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Aug 24, 2017 at 10:52:16PM -0400, Lan Tianyu wrote: > This patch is to increase hap size to support more vcpus in single VM. > > Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Can we maybe derive the number of pages needed from the number of vcpus? Bumping this value unconditionally is going to increase memory consumption.
On 8/25/2017 5:14 PM, Wei Liu wrote: > On Thu, Aug 24, 2017 at 10:52:16PM -0400, Lan Tianyu wrote: >> This patch is to increase hap size to support more vcpus in single VM. >> >> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> > > Can we maybe derive the number of pages needed from the number of vcpus? > Yes, we can add check of vcpu number here. > Bumping this value unconditionally is going to increase memory > consumption. >
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index cdc77a9..cb81368 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -473,7 +473,7 @@ int hap_enable(struct domain *d, u32 mode) if ( old_pages == 0 ) { paging_lock(d); - rv = hap_set_allocation(d, 256, NULL); + rv = hap_set_allocation(d, 512, NULL); if ( rv != 0 ) { hap_set_allocation(d, 0, NULL);
This patch is to increase hap size to support more vcpus in single VM. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> --- xen/arch/x86/mm/hap/hap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)