From: Lan Tianyu <tianyu.lan@intel.com>
To: xen-devel@lists.xen.org
Cc: Lan Tianyu <tianyu.lan@intel.com>,
kevin.tian@intel.com, wei.liu2@citrix.com,
george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, jbeulich@suse.com,
roger.pau@citrix.com, chao.gao@intel.com
Subject: [RFC PATCH V2 1/4] xen/hap: Increase hap page pool size for more vcpus support
Date: Thu, 31 Aug 2017 01:01:46 -0400 [thread overview]
Message-ID: <1504155709-24276-2-git-send-email-tianyu.lan@intel.com> (raw)
In-Reply-To: <1504155709-24276-1-git-send-email-tianyu.lan@intel.com>
This patch is to increase hap page pool size to support more vcpus in single VM.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
xen/arch/x86/mm/hap/hap.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index cdc77a9..96a7ed0 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -464,6 +464,7 @@ void hap_domain_init(struct domain *d)
int hap_enable(struct domain *d, u32 mode)
{
unsigned int old_pages;
+ unsigned int pages;
unsigned int i;
int rv = 0;
@@ -473,7 +474,14 @@ int hap_enable(struct domain *d, u32 mode)
if ( old_pages == 0 )
{
paging_lock(d);
- rv = hap_set_allocation(d, 256, NULL);
+
+ /* Increase hap page pool with max vcpu number. */
+ if ( d->max_vcpus > 128 )
+ pages = 256;
+ else
+ pages = 512;
+
+ rv = hap_set_allocation(d, pages, NULL);
if ( rv != 0 )
{
hap_set_allocation(d, 0, NULL);
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-31 5:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 5:01 [RFC PATCH V2 0/4] Extend resources to support more vcpus in single VM Lan Tianyu
2017-08-31 5:01 ` Lan Tianyu [this message]
2017-08-31 13:56 ` [RFC PATCH V2 1/4] xen/hap: Increase hap page pool size for more vcpus support Andrew Cooper
2017-09-01 8:19 ` Lan Tianyu
2017-09-01 8:34 ` Jan Beulich
2017-09-01 9:12 ` Lan Tianyu
2017-08-31 5:01 ` [RFC PATCH V2 2/4] Tool/ACPI: DSDT extension to support more vcpus Lan Tianyu
2017-08-31 15:38 ` Roger Pau Monné
2017-09-01 2:54 ` Lan Tianyu
2017-09-01 9:41 ` Roger Pau Monné
2017-09-01 10:10 ` Jan Beulich
2017-09-01 10:26 ` Roger Pau Monné
2017-09-04 3:07 ` Lan Tianyu
2017-09-04 9:05 ` Roger Pau Monné
2017-09-04 11:16 ` Lan Tianyu
2017-09-11 11:15 ` Julien Grall
2017-08-31 5:01 ` [RFC PATCH V2 3/4] hvmload: Add x2apic entry support in the MADT build Lan Tianyu
2017-09-01 9:57 ` Roger Pau Monné
2017-09-04 10:59 ` Lan Tianyu
2017-09-04 11:12 ` Roger Pau Monné
2017-09-04 12:59 ` Jan Beulich
2017-08-31 5:01 ` [RFC PATCH V2 4/4] xl/libacpi: extend lapic_id() to uint32_t Lan Tianyu
2017-08-31 13:58 ` Andrew Cooper
2017-09-01 15:41 ` Wei Liu
2017-09-04 8:20 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1504155709-24276-2-git-send-email-tianyu.lan@intel.com \
--to=tianyu.lan@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=chao.gao@intel.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=kevin.tian@intel.com \
--cc=roger.pau@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).