All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.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, dgdegra@tycho.nsa.gov
Subject: [PATCH v8 09/15] xl: add global grant limit config items
Date: Wed, 20 Sep 2017 08:34:24 +0200	[thread overview]
Message-ID: <20170920063430.9105-10-jgross@suse.com> (raw)
In-Reply-To: <20170920063430.9105-1-jgross@suse.com>

Add xl.conf config items for default values of grant limits:

max_grant_frames will set the default for the maximum number of grant
frames for a domain which will take effect if the domain's config file
doesn't specify a value. If max_grant_frames isn't set in xl.conf it
will default to 32 for hosts with all memory below 16TB and to 64 for
hosts with memory above 16TB.

max_maptrack_frames will set the default for the maximum number of
maptrack frames for a domain. If max_maptrack_frames isn't set in
xl.conf it will default to 0, as normally only backend domains need
maptrack frames.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
V7:
- don't use xc_maximum_ram_page() but max_possible_mfn from physinfo
---
 docs/man/xl.conf.pod.5 | 12 ++++++++++++
 tools/xl/xl.c          | 15 +++++++++++++++
 tools/xl/xl.h          |  2 ++
 3 files changed, 29 insertions(+)

diff --git a/docs/man/xl.conf.pod.5 b/docs/man/xl.conf.pod.5
index 88ab506609..fe2cf27ea4 100644
--- a/docs/man/xl.conf.pod.5
+++ b/docs/man/xl.conf.pod.5
@@ -77,6 +77,18 @@ operations (primarily domain creation).
 
 Default: C</var/lock/xl>
 
+=item B<max_grant_frames=NUMBER>
+
+Sets the default value for the C<max_grant_frames> domain config value.
+
+Default: C<32> on hosts up to 16TB of memory, C<64> on hosts larger than 16TB
+
+=item B<max_maptrack_frames=NUMBER>
+
+Sets the default value for the C<max_maptrack_frames> domain config value.
+
+Default: C<0>
+
 =item B<vif.default.script="PATH">
 
 Configures the default hotplug script used by virtual network devices.
diff --git a/tools/xl/xl.c b/tools/xl/xl.c
index 02179a6229..c1bbb4b939 100644
--- a/tools/xl/xl.c
+++ b/tools/xl/xl.c
@@ -45,6 +45,8 @@ char *default_colo_proxy_script = NULL;
 enum output_format default_output_format = OUTPUT_FORMAT_JSON;
 int claim_mode = 1;
 bool progress_use_cr = 0;
+int max_grant_frames = -1;
+int max_maptrack_frames = 0;
 
 xentoollog_level minmsglevel = minmsglevel_default;
 
@@ -88,6 +90,7 @@ static void parse_global_config(const char *configfile,
     XLU_Config *config;
     int e;
     const char *buf;
+    libxl_physinfo physinfo;
 
     config = xlu_cfg_init(stderr, configfile);
     if (!config) {
@@ -188,6 +191,18 @@ static void parse_global_config(const char *configfile,
     xlu_cfg_replace_string (config, "colo.default.proxyscript",
         &default_colo_proxy_script, 0);
 
+    if (!xlu_cfg_get_long (config, "max_grant_frames", &l, 0))
+        max_grant_frames = l;
+    else {
+        libxl_physinfo_init(&physinfo);
+        max_grant_frames = (libxl_get_physinfo(ctx, &physinfo) != 0 ||
+                            !(physinfo.max_possible_mfn >> 32))
+                           ? 32 : 64;
+        libxl_physinfo_dispose(&physinfo);
+    }
+    if (!xlu_cfg_get_long (config, "max_maptrack_frames", &l, 0))
+        max_maptrack_frames = l;
+
     xlu_cfg_destroy(config);
 }
 
diff --git a/tools/xl/xl.h b/tools/xl/xl.h
index 31d660b89a..6b60d1db50 100644
--- a/tools/xl/xl.h
+++ b/tools/xl/xl.h
@@ -275,6 +275,8 @@ extern char *default_vifbackend;
 extern char *default_remus_netbufscript;
 extern char *default_colo_proxy_script;
 extern char *blkdev_start;
+extern int max_grant_frames;
+extern int max_maptrack_frames;
 
 enum output_format {
     OUTPUT_FORMAT_JSON,
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-09-20  6:34 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20  6:34 [PATCH v8 00/15] xen: better grant v2 support Juergen Gross
2017-09-20  6:34 ` [PATCH v8 01/15] xen: move XENMAPSPACE_grant_table code into grant_table.c Juergen Gross
2017-09-20 12:40   ` Julien Grall
2017-09-20  6:34 ` [PATCH v8 02/15] xen: clean up grant_table.h Juergen Gross
2017-09-20  6:34 ` [PATCH v8 03/15] xen: add new domctl hypercall to set grant table resource limits Juergen Gross
2017-09-20  8:26   ` Paul Durrant
2017-09-20  8:49     ` Jan Beulich
2017-09-20  6:34 ` [PATCH v8 04/15] xen: add function for obtaining highest possible memory address Juergen Gross
2017-09-20  8:57   ` Jan Beulich
     [not found]   ` <59C2499A020000780017D412@suse.com>
2017-09-20  8:58     ` Juergen Gross
2017-09-20  9:32       ` Jan Beulich
     [not found]       ` <59C251C8020000780017D4D7@suse.com>
2017-09-20  9:39         ` Juergen Gross
2017-09-20 12:51   ` Julien Grall
2017-09-20 13:08     ` Juergen Gross
2017-09-20 14:24       ` Julien Grall
2017-09-20 14:33         ` Juergen Gross
2017-09-20 17:15           ` Julien Grall
2017-09-21  4:18             ` Juergen Gross
2017-09-20  6:34 ` [PATCH v8 05/15] xen: add max possible mfn to struct xen_sysctl_physinfo Juergen Gross
2017-09-20  8:58   ` Jan Beulich
     [not found]   ` <59C249F3020000780017D415@suse.com>
2017-09-20  9:00     ` Juergen Gross
2017-09-20 12:53   ` Julien Grall
2017-09-20 13:06     ` Juergen Gross
2017-09-20  6:34 ` [PATCH v8 06/15] libxc: add libxc support for setting grant table resource limits Juergen Gross
2017-09-20  6:34 ` [PATCH v8 07/15] tools: set grant limits for xenstore stubdom Juergen Gross
2017-09-20  6:34 ` [PATCH v8 08/15] libxl: add max possible mfn to libxl_physinfo Juergen Gross
2017-09-20  6:34 ` Juergen Gross [this message]
2017-09-20  6:34 ` [PATCH v8 10/15] libxl: add libxl support for setting grant table resource limits Juergen Gross
2017-09-20  6:34 ` [PATCH v8 11/15] xen: delay allocation of grant table sub structures Juergen Gross
2017-09-20  9:22   ` Jan Beulich
     [not found]   ` <59C24F80020000780017D473@suse.com>
2017-09-20  9:44     ` Juergen Gross
2017-09-20 10:02       ` Jan Beulich
     [not found]       ` <59C258D4020000780017D521@suse.com>
2017-09-20 10:05         ` Juergen Gross
2017-09-20  6:34 ` [PATCH v8 12/15] xen/arm: move arch specific grant table bits into grant_table.c Juergen Gross
2017-09-20  9:25   ` Jan Beulich
2017-09-20 14:34   ` Julien Grall
2017-09-21  4:36     ` Juergen Gross
2017-09-20  6:34 ` [PATCH v8 13/15] xen: make grant resource limits per domain Juergen Gross
2017-09-20 10:34   ` Jan Beulich
2017-09-20 14:37     ` Julien Grall
     [not found]   ` <59C2603C020000780017D561@suse.com>
2017-09-20 11:10     ` Juergen Gross
2017-09-20 11:48       ` Jan Beulich
     [not found]       ` <59C271B9020000780017D620@suse.com>
2017-09-20 12:44         ` Juergen Gross
2017-09-20 15:35           ` Jan Beulich
     [not found]           ` <59C2A6DE020000780017D874@suse.com>
2017-09-21  4:35             ` Juergen Gross
2017-09-21  6:15               ` Jan Beulich
     [not found]               ` <59C3751D020000780017DCB6@suse.com>
2017-09-21  7:53                 ` Juergen Gross
2017-09-21 11:31                   ` Jan Beulich
     [not found]                   ` <59C3BF28020000780017DE68@suse.com>
2017-09-21 11:39                     ` Juergen Gross
2017-09-21 11:48                       ` Jan Beulich
     [not found]                       ` <59C3C33E020000780017DEC3@suse.com>
2017-09-21 11:51                         ` Juergen Gross
2017-09-22  6:19                         ` Juergen Gross
2017-09-22  7:53                           ` Jan Beulich
     [not found]                           ` <59C4DD9B020000780017E575@suse.com>
2017-09-22  8:27                             ` Juergen Gross
2017-09-22  8:35                               ` Jan Beulich
     [not found]                               ` <59C4E78B020000780017E67D@suse.com>
2017-09-22  8:44                                 ` Juergen Gross
2017-09-22  8:51                                   ` Jan Beulich
2017-09-20  6:34 ` [PATCH v8 14/15] xen: make grant table limits boot parameters dom0 only Juergen Gross
2017-09-20 12:07   ` Jan Beulich
     [not found]   ` <59C27619020000780017D66F@suse.com>
2017-09-20 12:48     ` Juergen Gross
2017-09-20 15:36       ` Jan Beulich
     [not found]       ` <59C2A72D020000780017D881@suse.com>
2017-09-21  4:27         ` Juergen Gross
2017-09-21  6:16           ` Jan Beulich
2017-09-20  6:34 ` [PATCH v8 15/15] xen: add new Xen cpuid node for max address width info Juergen Gross
2017-09-20 12:18   ` Jan Beulich
     [not found]   ` <59C278A3020000780017D689@suse.com>
2017-09-20 12:58     ` Juergen Gross
2017-09-20 15:42       ` Jan Beulich
     [not found]       ` <59C2A880020000780017D8A2@suse.com>
2017-09-21  4:21         ` Juergen Gross
2017-09-20 13:00   ` Julien Grall

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=20170920063430.9105-10-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --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.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.