From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xen.org
Cc: Juergen Gross <jgross@suse.com>,
sstabellini@kernel.org, wei.liu2@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, tim@xen.org, julien.grall@arm.com,
jbeulich@suse.com
Subject: [PATCH v3 5/8] xen: double default grant frame limit for huge hosts
Date: Wed, 6 Sep 2017 14:46:50 +0200 [thread overview]
Message-ID: <20170906124653.5408-6-jgross@suse.com> (raw)
In-Reply-To: <20170906124653.5408-1-jgross@suse.com>
In case a system has memory above the 16TB boundary double the default
grant frame number limit per domain. This ensures a pv domain can still
establish the same number of grants even if it is required to use
version 2 grants which need twice the space of v1 grants.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
---
xen/common/grant_table.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index ff735a4b47..c00119f2fe 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -3824,8 +3824,15 @@ static int __init gnttab_usage_init(void)
{
BUILD_BUG_ON(DEFAULT_MAX_MAPTRACK_FRAMES < DEFAULT_MAX_NR_GRANT_FRAMES);
+ /*
+ * In case grant v2 is required for pv domains to reference any possible
+ * memory page (i.e. memory is installed above 16TB boundary) double the
+ * grant frame limit. This will allow a guest using v2 grants without
+ * having to lower the number of usable grants.
+ */
if ( !max_grant_frames )
- max_grant_frames = DEFAULT_MAX_NR_GRANT_FRAMES;
+ max_grant_frames = ((max_page >> 32) ? 2 : 1) *
+ DEFAULT_MAX_NR_GRANT_FRAMES;
if ( !max_maptrack_frames )
max_maptrack_frames = DEFAULT_MAX_MAPTRACK_FRAMES;
--
2.12.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-06 12:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 12:46 [PATCH v3 0/8] xen: better grant v2 support Juergen Gross
2017-09-06 12:46 ` [PATCH v3 1/8] xen: move XENMAPSPACE_grant_table code into grant_table.c Juergen Gross
2017-09-06 12:46 ` [PATCH v3 2/8] xen: clean up grant_table.h Juergen Gross
2017-09-06 12:46 ` [PATCH v3 3/8] xen: delay allocation of grant table sub structures Juergen Gross
2017-09-06 13:04 ` Paul Durrant
2017-09-06 15:11 ` Wei Liu
2017-09-06 15:15 ` Juergen Gross
2017-09-06 15:32 ` Wei Liu
2017-09-06 15:36 ` Juergen Gross
2017-09-06 15:42 ` Wei Liu
2017-09-06 12:46 ` [PATCH v3 4/8] xen: make grant resource limits per domain Juergen Gross
2017-09-06 15:58 ` Wei Liu
2017-09-06 12:46 ` Juergen Gross [this message]
2017-09-06 16:03 ` [PATCH v3 5/8] xen: double default grant frame limit for huge hosts Wei Liu
2017-09-06 12:46 ` [PATCH v3 6/8] xen: add new domctl hypercall to set grant table resource limits Juergen Gross
2017-09-06 13:07 ` Paul Durrant
2017-09-07 8:54 ` Wei Liu
2017-09-06 12:46 ` [PATCH v3 7/8] libxc: add libxc support for setting " Juergen Gross
2017-09-06 13:08 ` Paul Durrant
2017-09-07 8:55 ` Wei Liu
2017-09-07 9:06 ` Juergen Gross
2017-09-06 12:46 ` [PATCH v3 8/8] libxl: add libxl " Juergen Gross
2017-09-06 13:10 ` Paul Durrant
2017-09-07 9:02 ` Wei Liu
2017-09-07 9:06 ` Juergen Gross
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=20170906124653.5408-6-jgross@suse.com \
--to=jgross@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--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).