diff mbox

[RFC,1/5] xen/hap: Increase hap size for more vcpus support

Message ID 1503629540-26053-2-git-send-email-tianyu.lan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

lan,Tianyu Aug. 25, 2017, 2:52 a.m. UTC
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(-)

Comments

Wei Liu Aug. 25, 2017, 9:14 a.m. UTC | #1
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.
lan,Tianyu Aug. 28, 2017, 8:53 a.m. UTC | #2
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 mbox

Patch

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);