xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] tools: support autoballooning of xenstore domain
@ 2016-08-08  8:28 Juergen Gross
  2016-08-08  8:28 ` [PATCH 1/3] tools: add --maxmem parameter to init-xenstore-domain Juergen Gross
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Juergen Gross @ 2016-08-08  8:28 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson, stefano.stabellini

Support xenstore domain autoballooning by:
- adding --maxmem parameter to init-xenstore-domain
- build xenstore stubdom with Mini-OS CONFIG_BALLOON set
- add XENSTORE_MAX_DOMAIN_SIZE parameter to sysconfig.xencommons

This series requires Mini-OS ballooning support, of course. I'm posting
it now because this will make it easier to test my Mini-OS series.

Juergen Gross (3):
  tools: add --maxmem parameter to init-xenstore-domain
  stubdom: add CONFIG_BALLOON to xenstore config
  tools: add config parameter for maximum memory of xenstore domain

 stubdom/xenstore-minios.cfg                        |  1 +
 tools/helpers/init-xenstore-domain.c               | 83 +++++++++++++++++++++-
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 11 +++
 tools/hotplug/Linux/launch-xenstore.in             |  1 +
 4 files changed, 94 insertions(+), 2 deletions(-)

-- 
2.6.6


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/3] tools: add --maxmem parameter to init-xenstore-domain
  2016-08-08  8:28 [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
@ 2016-08-08  8:28 ` Juergen Gross
  2016-08-11 17:03   ` Wei Liu
  2016-08-08  8:28 ` [PATCH 2/3] stubdom: add CONFIG_BALLOON to xenstore config Juergen Gross
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Juergen Gross @ 2016-08-08  8:28 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson, stefano.stabellini

Add a parameter to specify the maximum memory size of the xenstore
domain. In case the xenstore domain supports ballooning it will be
capable to adjust its own size according to its memory needs.

The maximum memory size can be specified as an absolute value in
MiB, as a fraction of the host's memory, or as a combination of
both (the maximum of the absolute and the fraction value):

--maxmem <m>             maxmem is <m> MiB
--maxmem <a>/<b>         maxmem is hostmem * a / b
--maxmem <m>:<a>/<b>     maxmem is max(<m> MiB, hostmem * a / b)

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 tools/helpers/init-xenstore-domain.c | 83 +++++++++++++++++++++++++++++++++++-
 1 file changed, 81 insertions(+), 2 deletions(-)

diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xenstore-domain.c
index 53b4b01..a7c97d7 100644
--- a/tools/helpers/init-xenstore-domain.c
+++ b/tools/helpers/init-xenstore-domain.c
@@ -23,6 +23,7 @@ static char *flask;
 static char *param;
 static char *name = "Xenstore";
 static int memory;
+static int maxmem;
 
 static struct option options[] = {
     { "kernel", 1, NULL, 'k' },
@@ -31,6 +32,7 @@ static struct option options[] = {
     { "ramdisk", 1, NULL, 'r' },
     { "param", 1, NULL, 'p' },
     { "name", 1, NULL, 'n' },
+    { "maxmem", 1, NULL, 'M' },
     { NULL, 0, NULL, 0 }
 };
 
@@ -48,7 +50,11 @@ static void usage(void)
 "  --flask <flask-label>      optional flask label of the domain\n"
 "  --ramdisk <ramdisk-file>   optional ramdisk file for the domain\n"
 "  --param <cmdline>          optional additional parameters for the domain\n"
-"  --name <name>              name of the domain (default: Xenstore)\n");
+"  --name <name>              name of the domain (default: Xenstore)\n"
+"  --maxmem <max size>        maximum memory size in the format:\n"
+"                             <MB val>|<a>/<b>|<MB val>:<a>/<b>\n"
+"                             (an absolute value in MB, a fraction a/b of\n"
+"                             the host memory, or the maximum of both)\n");
 }
 
 static int build(xc_interface *xch)
@@ -58,7 +64,7 @@ static int build(xc_interface *xch)
     xen_domain_handle_t handle = { 0 };
     int rv, xs_fd;
     struct xc_dom_image *dom = NULL;
-    int limit_kb = (memory + 1) * 1024;
+    int limit_kb = (maxmem ? : (memory + 1)) * 1024;
 
     xs_fd = open("/dev/xen/xenbus_backend", O_RDWR);
     if ( xs_fd == -1 )
@@ -223,6 +229,63 @@ static int check_domain(xc_interface *xch)
     return 0;
 }
 
+static int parse_maxmem(xc_interface *xch, char *str)
+{
+    xc_physinfo_t info;
+    int rv;
+    unsigned long mb = 0, a = 0, b = 0;
+    unsigned long val;
+    unsigned long *res;
+    char buf[16];
+    char *p;
+    char *s = str;
+
+    rv = xc_physinfo(xch, &info);
+    if ( rv )
+    {
+        fprintf(stderr, "xc_physinfo failed\n");
+        return -1;
+    }
+
+    res = &mb;
+    for (p = s; *p; s = p + 1)
+    {
+        val = strtoul(s, &p, 10);
+        if ( val == 0 || val >= INT_MAX / 1024 )
+            goto err;
+        if ( *p == '/' )
+        {
+            if ( res != &mb || a != 0 )
+                goto err;
+            a = val;
+            res = &b;
+            continue;
+        }
+        if ( *res != 0 )
+            goto err;
+        *res = val;
+        if ( *p != 0 && *p != ':' )
+            goto err;
+        res = &mb;
+    }
+    if ( a && !b )
+        goto err;
+
+    val = a ? info.total_pages * a / (b * 1024 * 1024 / XC_PAGE_SIZE) : 0;
+    if ( val >= INT_MAX / 1024 )
+        goto err;
+
+    maxmem = mb < val ? val : mb;
+    if ( maxmem < memory )
+        maxmem = 0;
+
+    return maxmem;
+
+err:
+    fprintf(stderr, "illegal value for maxmem: %s\n", str);
+    return -1;
+}
+
 static void do_xs_write(struct xs_handle *xsh, char *path, char *val)
 {
     if ( !xs_write(xsh, XBT_NULL, path, val, strlen(val)) )
@@ -244,6 +307,7 @@ int main(int argc, char** argv)
     struct xs_handle *xsh;
     char buf[16];
     int rv, fd;
+    char *maxmem_str = NULL;
 
     while ( (opt = getopt_long(argc, argv, "", options, NULL)) != -1 )
     {
@@ -267,6 +331,9 @@ int main(int argc, char** argv)
         case 'n':
             name = optarg;
             break;
+        case 'M':
+            maxmem_str = optarg;
+            break;
         default:
             usage();
             return 2;
@@ -286,6 +353,16 @@ int main(int argc, char** argv)
         return 1;
     }
 
+    if ( maxmem_str )
+    {
+        maxmem = parse_maxmem(xch, maxmem_str);
+        if ( maxmem < 0 )
+        {
+            xc_interface_close(xch);
+            return 1;
+        }
+    }
+
     rv = check_domain(xch);
 
     if ( !rv )
@@ -314,6 +391,8 @@ int main(int argc, char** argv)
     do_xs_write_dom(xsh, "name", name);
     snprintf(buf, 16, "%d", memory * 1024);
     do_xs_write_dom(xsh, "memory/target", buf);
+    if (maxmem)
+        snprintf(buf, 16, "%d", maxmem * 1024);
     do_xs_write_dom(xsh, "memory/static-max", buf);
     xs_close(xsh);
 
-- 
2.6.6


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/3] stubdom: add CONFIG_BALLOON to xenstore config
  2016-08-08  8:28 [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
  2016-08-08  8:28 ` [PATCH 1/3] tools: add --maxmem parameter to init-xenstore-domain Juergen Gross
@ 2016-08-08  8:28 ` Juergen Gross
  2016-08-11 17:03   ` Wei Liu
  2016-08-08  8:28 ` [PATCH 3/3] tools: add config parameter for maximum memory of xenstore domain Juergen Gross
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Juergen Gross @ 2016-08-08  8:28 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson, stefano.stabellini

Compile xenstore stubdom with ballooning support.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 stubdom/xenstore-minios.cfg | 1 +
 1 file changed, 1 insertion(+)

diff --git a/stubdom/xenstore-minios.cfg b/stubdom/xenstore-minios.cfg
index 6a09cce..c89e9f0 100644
--- a/stubdom/xenstore-minios.cfg
+++ b/stubdom/xenstore-minios.cfg
@@ -5,3 +5,4 @@ CONFIG_KBDFRONT=n
 CONFIG_CONSFRONT=n
 CONFIG_XENBUS=n
 CONFIG_LWIP=n
+CONFIG_BALLOON=y
-- 
2.6.6


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/3] tools: add config parameter for maximum memory of xenstore domain
  2016-08-08  8:28 [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
  2016-08-08  8:28 ` [PATCH 1/3] tools: add --maxmem parameter to init-xenstore-domain Juergen Gross
  2016-08-08  8:28 ` [PATCH 2/3] stubdom: add CONFIG_BALLOON to xenstore config Juergen Gross
@ 2016-08-08  8:28 ` Juergen Gross
  2016-08-11 17:03   ` Wei Liu
  2016-08-08 14:45 ` [PATCH 0/3] tools: support autoballooning " Ian Jackson
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Juergen Gross @ 2016-08-08  8:28 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson, stefano.stabellini

Add a parameter to xencommons configuration file for specifying the
maximum memory size of the xenstore domain.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 11 +++++++++++
 tools/hotplug/Linux/launch-xenstore.in             |  1 +
 2 files changed, 12 insertions(+)

diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index cc8185c..92569cd 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -70,6 +70,17 @@ XENSTORED_ARGS=
 #XENSTORE_DOMAIN_SIZE=8
 
 ## Type: string
+## Default: not set, no autoballooning of xenstore domain
+#
+# Maximum xenstore domain memory size. Can be specified as:
+# - plain integer value for max size in MiB
+# - fraction of host memory, e.g. 1/100
+# - combination of both in form of <val>:<frac> (e.g. 8:1/100), resulting
+#   value will be the higher of both specifications
+# Only evaluated if XENSTORETYPE is "domain".
+#XENSTORE_MAX_DOMAIN_SIZE=
+
+## Type: string
 ## Default: ""
 #
 # Additional arguments for starting the xenstore domain.
diff --git a/tools/hotplug/Linux/launch-xenstore.in b/tools/hotplug/Linux/launch-xenstore.in
index 46defd6..01193be 100644
--- a/tools/hotplug/Linux/launch-xenstore.in
+++ b/tools/hotplug/Linux/launch-xenstore.in
@@ -75,6 +75,7 @@ test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons && . @CONFIG_DIR@/@CONFIG_LEAF
 	XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --kernel $XENSTORE_DOMAIN_KERNEL"
 	[ -z "$XENSTORE_DOMAIN_SIZE" ] && XENSTORE_DOMAIN_SIZE=8
 	XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --memory $XENSTORE_DOMAIN_SIZE"
+	[ -z "$XENSTORE_MAX_DOMAIN_SIZE" ] || XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --maxmem $XENSTORE_MAX_DOMAIN_SIZE"
 
 	echo -n Starting $XENSTORE_DOMAIN_KERNEL...
 	${LIBEXEC_BIN}/init-xenstore-domain $XENSTORE_DOMAIN_ARGS || exit 1
-- 
2.6.6


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain
  2016-08-08  8:28 [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
                   ` (2 preceding siblings ...)
  2016-08-08  8:28 ` [PATCH 3/3] tools: add config parameter for maximum memory of xenstore domain Juergen Gross
@ 2016-08-08 14:45 ` Ian Jackson
  2016-08-08 17:31   ` Juergen Gross
  2016-08-29  6:22 ` Juergen Gross
  2016-09-06 10:01 ` [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
  5 siblings, 1 reply; 15+ messages in thread
From: Ian Jackson @ 2016-08-08 14:45 UTC (permalink / raw)
  To: Juergen Gross; +Cc: stefano.stabellini, wei.liu2, xen-devel

Juergen Gross writes ("[PATCH 0/3] tools: support autoballooning of xenstore domain"):
> Support xenstore domain autoballooning by:
> - adding --maxmem parameter to init-xenstore-domain
> - build xenstore stubdom with Mini-OS CONFIG_BALLOON set
> - add XENSTORE_MAX_DOMAIN_SIZE parameter to sysconfig.xencommons
> 
> This series requires Mini-OS ballooning support, of course. I'm posting
> it now because this will make it easier to test my Mini-OS series.

The basic idea seems sound enough, and I didn't spot much wrong with
the implementation, although I have some questions/observations:

 * AFAICT this is going to take effect for C xenstored.  But ISTM that
   we probably want to be moving away from C xenstored; its code is
   difficult, it has a history of hard to fathom bugs, and I'm
   concerned about its security properties.

 * I find that the pointer-arithmetic-based parsing style (as seen in
   patch 1) very hard to read.  I haven't reviewed it.  But I think it
   is not exposed to untrusted input so I don't think I care.

 * If we are going in this direction, this feature probably wants to
   be enabled by default.  Do you have a good idea of default
   parameters ?

Thanks,
Ian.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain
  2016-08-08 14:45 ` [PATCH 0/3] tools: support autoballooning " Ian Jackson
@ 2016-08-08 17:31   ` Juergen Gross
  2016-08-24 11:12     ` Wei Liu
  0 siblings, 1 reply; 15+ messages in thread
From: Juergen Gross @ 2016-08-08 17:31 UTC (permalink / raw)
  To: Ian Jackson; +Cc: stefano.stabellini, wei.liu2, xen-devel

On 08/08/16 16:45, Ian Jackson wrote:
> Juergen Gross writes ("[PATCH 0/3] tools: support autoballooning of xenstore domain"):
>> Support xenstore domain autoballooning by:
>> - adding --maxmem parameter to init-xenstore-domain
>> - build xenstore stubdom with Mini-OS CONFIG_BALLOON set
>> - add XENSTORE_MAX_DOMAIN_SIZE parameter to sysconfig.xencommons
>>
>> This series requires Mini-OS ballooning support, of course. I'm posting
>> it now because this will make it easier to test my Mini-OS series.
> 
> The basic idea seems sound enough, and I didn't spot much wrong with
> the implementation, although I have some questions/observations:
> 
>  * AFAICT this is going to take effect for C xenstored.  But ISTM that
>    we probably want to be moving away from C xenstored; its code is
>    difficult, it has a history of hard to fathom bugs, and I'm
>    concerned about its security properties.

This should work for ocaml based xenstore domain, too. I've been told
that is based on Mini-OS, so there is no reason it shouldn't work.

>  * I find that the pointer-arithmetic-based parsing style (as seen in
>    patch 1) very hard to read.  I haven't reviewed it.  But I think it
>    is not exposed to untrusted input so I don't think I care.

I wouldn't mind another way to do it. This variant seemed to be most
compact and passed all verification testing I did (and I tried a lot
of nonsense).

>  * If we are going in this direction, this feature probably wants to
>    be enabled by default.  Do you have a good idea of default
>    parameters ?

Hmm, that's not too easy. For a "normal" guest about a quarter MB of
memory for Xenstore seems to be a lot. I guess these days most guests
have at least 256 MB, so 1/1000 of host memory seems to be appropriate.
We don't risk anything going a little bit higher, as Mini-OS doesn't
have anything like page structures consuming memory for the not yet
taken domain memory. Of course we need some MB (e.g. 4) as a starting
point as the kernel needs some memory even if the host is very small.
So what about 4:1/512 ? This would give us 4 MB at minimum and on a
16 TB machine we could go up to 32 GB which still wouldn't blow up the
theoretical boundaries of Mini-OS.


Juergen

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/3] tools: add config parameter for maximum memory of xenstore domain
  2016-08-08  8:28 ` [PATCH 3/3] tools: add config parameter for maximum memory of xenstore domain Juergen Gross
@ 2016-08-11 17:03   ` Wei Liu
  0 siblings, 0 replies; 15+ messages in thread
From: Wei Liu @ 2016-08-11 17:03 UTC (permalink / raw)
  To: Juergen Gross; +Cc: wei.liu2, stefano.stabellini, ian.jackson, xen-devel

On Mon, Aug 08, 2016 at 10:28:29AM +0200, Juergen Gross wrote:
> Add a parameter to xencommons configuration file for specifying the
> maximum memory size of the xenstore domain.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/3] tools: add --maxmem parameter to init-xenstore-domain
  2016-08-08  8:28 ` [PATCH 1/3] tools: add --maxmem parameter to init-xenstore-domain Juergen Gross
@ 2016-08-11 17:03   ` Wei Liu
  0 siblings, 0 replies; 15+ messages in thread
From: Wei Liu @ 2016-08-11 17:03 UTC (permalink / raw)
  To: Juergen Gross; +Cc: wei.liu2, stefano.stabellini, ian.jackson, xen-devel

On Mon, Aug 08, 2016 at 10:28:27AM +0200, Juergen Gross wrote:
> Add a parameter to specify the maximum memory size of the xenstore
> domain. In case the xenstore domain supports ballooning it will be
> capable to adjust its own size according to its memory needs.
> 
> The maximum memory size can be specified as an absolute value in
> MiB, as a fraction of the host's memory, or as a combination of
> both (the maximum of the absolute and the fraction value):
> 
> --maxmem <m>             maxmem is <m> MiB
> --maxmem <a>/<b>         maxmem is hostmem * a / b
> --maxmem <m>:<a>/<b>     maxmem is max(<m> MiB, hostmem * a / b)
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Code looks OK.

Acked-by: Wei Liu <wei.liu2@citrix.com>

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/3] stubdom: add CONFIG_BALLOON to xenstore config
  2016-08-08  8:28 ` [PATCH 2/3] stubdom: add CONFIG_BALLOON to xenstore config Juergen Gross
@ 2016-08-11 17:03   ` Wei Liu
  0 siblings, 0 replies; 15+ messages in thread
From: Wei Liu @ 2016-08-11 17:03 UTC (permalink / raw)
  To: Juergen Gross; +Cc: wei.liu2, stefano.stabellini, ian.jackson, xen-devel

On Mon, Aug 08, 2016 at 10:28:28AM +0200, Juergen Gross wrote:
> Compile xenstore stubdom with ballooning support.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain
  2016-08-08 17:31   ` Juergen Gross
@ 2016-08-24 11:12     ` Wei Liu
  0 siblings, 0 replies; 15+ messages in thread
From: Wei Liu @ 2016-08-24 11:12 UTC (permalink / raw)
  To: Juergen Gross, Ian Jackson; +Cc: stefano.stabellini, wei.liu2, xen-devel

On Mon, Aug 08, 2016 at 07:31:28PM +0200, Juergen Gross wrote:
> On 08/08/16 16:45, Ian Jackson wrote:
> > Juergen Gross writes ("[PATCH 0/3] tools: support autoballooning of xenstore domain"):
> >> Support xenstore domain autoballooning by:
> >> - adding --maxmem parameter to init-xenstore-domain
> >> - build xenstore stubdom with Mini-OS CONFIG_BALLOON set
> >> - add XENSTORE_MAX_DOMAIN_SIZE parameter to sysconfig.xencommons
> >>
> >> This series requires Mini-OS ballooning support, of course. I'm posting
> >> it now because this will make it easier to test my Mini-OS series.
> > 
> > The basic idea seems sound enough, and I didn't spot much wrong with
> > the implementation, although I have some questions/observations:
> > 
> >  * AFAICT this is going to take effect for C xenstored.  But ISTM that
> >    we probably want to be moving away from C xenstored; its code is
> >    difficult, it has a history of hard to fathom bugs, and I'm
> >    concerned about its security properties.
> 
> This should work for ocaml based xenstore domain, too. I've been told
> that is based on Mini-OS, so there is no reason it shouldn't work.
> 
> >  * I find that the pointer-arithmetic-based parsing style (as seen in
> >    patch 1) very hard to read.  I haven't reviewed it.  But I think it
> >    is not exposed to untrusted input so I don't think I care.
> 
> I wouldn't mind another way to do it. This variant seemed to be most
> compact and passed all verification testing I did (and I tried a lot
> of nonsense).
> 
> >  * If we are going in this direction, this feature probably wants to
> >    be enabled by default.  Do you have a good idea of default
> >    parameters ?
> 
> Hmm, that's not too easy. For a "normal" guest about a quarter MB of
> memory for Xenstore seems to be a lot. I guess these days most guests
> have at least 256 MB, so 1/1000 of host memory seems to be appropriate.
> We don't risk anything going a little bit higher, as Mini-OS doesn't
> have anything like page structures consuming memory for the not yet
> taken domain memory. Of course we need some MB (e.g. 4) as a starting
> point as the kernel needs some memory even if the host is very small.
> So what about 4:1/512 ? This would give us 4 MB at minimum and on a
> 16 TB machine we could go up to 32 GB which still wouldn't blow up the
> theoretical boundaries of Mini-OS.
> 
> 

Ian, are all your concerns addressed?

Wei.

> Juergen

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain
  2016-08-08  8:28 [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
                   ` (3 preceding siblings ...)
  2016-08-08 14:45 ` [PATCH 0/3] tools: support autoballooning " Ian Jackson
@ 2016-08-29  6:22 ` Juergen Gross
  2016-08-29  8:52   ` Wei Liu
  2016-09-06 10:01 ` [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
  5 siblings, 1 reply; 15+ messages in thread
From: Juergen Gross @ 2016-08-29  6:22 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, wei.liu2, stefano.stabellini

On 08/08/16 10:28, Juergen Gross wrote:
> Support xenstore domain autoballooning by:
> - adding --maxmem parameter to init-xenstore-domain
> - build xenstore stubdom with Mini-OS CONFIG_BALLOON set
> - add XENSTORE_MAX_DOMAIN_SIZE parameter to sysconfig.xencommons
> 
> This series requires Mini-OS ballooning support, of course. I'm posting
> it now because this will make it easier to test my Mini-OS series.
> 
> Juergen Gross (3):
>   tools: add --maxmem parameter to init-xenstore-domain
>   stubdom: add CONFIG_BALLOON to xenstore config
>   tools: add config parameter for maximum memory of xenstore domain

So Mini-OS ballooning is available now. Anything missing from my side
for this series to be accepted?


Juergen


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain
  2016-08-29  6:22 ` Juergen Gross
@ 2016-08-29  8:52   ` Wei Liu
  2016-09-06 10:09     ` [PATCH 0/3] tools: support autoballooning of xenstore domain [and 1 more messages] Ian Jackson
  0 siblings, 1 reply; 15+ messages in thread
From: Wei Liu @ 2016-08-29  8:52 UTC (permalink / raw)
  To: Juergen Gross; +Cc: ian.jackson, stefano.stabellini, wei.liu2, xen-devel

On Mon, Aug 29, 2016 at 08:22:14AM +0200, Juergen Gross wrote:
> On 08/08/16 10:28, Juergen Gross wrote:
> > Support xenstore domain autoballooning by:
> > - adding --maxmem parameter to init-xenstore-domain
> > - build xenstore stubdom with Mini-OS CONFIG_BALLOON set
> > - add XENSTORE_MAX_DOMAIN_SIZE parameter to sysconfig.xencommons
> > 
> > This series requires Mini-OS ballooning support, of course. I'm posting
> > it now because this will make it easier to test my Mini-OS series.
> > 
> > Juergen Gross (3):
> >   tools: add --maxmem parameter to init-xenstore-domain
> >   stubdom: add CONFIG_BALLOON to xenstore config
> >   tools: add config parameter for maximum memory of xenstore domain
> 
> So Mini-OS ballooning is available now. Anything missing from my side
> for this series to be accepted?
> 

I'm waiting for Ian to confirm if his concerns are addressed.

Wei.

> 
> Juergen
> 

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain
  2016-08-08  8:28 [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
                   ` (4 preceding siblings ...)
  2016-08-29  6:22 ` Juergen Gross
@ 2016-09-06 10:01 ` Juergen Gross
  5 siblings, 0 replies; 15+ messages in thread
From: Juergen Gross @ 2016-09-06 10:01 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, wei.liu2, stefano.stabellini

On 08/08/16 10:28, Juergen Gross wrote:
> Support xenstore domain autoballooning by:
> - adding --maxmem parameter to init-xenstore-domain
> - build xenstore stubdom with Mini-OS CONFIG_BALLOON set
> - add XENSTORE_MAX_DOMAIN_SIZE parameter to sysconfig.xencommons
> 
> This series requires Mini-OS ballooning support, of course. I'm posting
> it now because this will make it easier to test my Mini-OS series.
> 
> Juergen Gross (3):
>   tools: add --maxmem parameter to init-xenstore-domain
>   stubdom: add CONFIG_BALLOON to xenstore config
>   tools: add config parameter for maximum memory of xenstore domain
> 
>  stubdom/xenstore-minios.cfg                        |  1 +
>  tools/helpers/init-xenstore-domain.c               | 83 +++++++++++++++++++++-
>  tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 11 +++
>  tools/hotplug/Linux/launch-xenstore.in             |  1 +
>  4 files changed, 94 insertions(+), 2 deletions(-)
> 

Another PING.


Juergen

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain [and 1 more messages]
  2016-08-29  8:52   ` Wei Liu
@ 2016-09-06 10:09     ` Ian Jackson
  2016-09-06 10:45       ` Wei Liu
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Jackson @ 2016-09-06 10:09 UTC (permalink / raw)
  To: Juergen Gross, Wei Liu; +Cc: stefano.stabellini, xen-devel

Wei Liu writes ("Re: [Xen-devel] [PATCH 0/3] tools: support autoballooning of xenstore domain"):
> On Mon, Aug 29, 2016 at 08:22:14AM +0200, Juergen Gross wrote:
> > So Mini-OS ballooning is available now. Anything missing from my side
> > for this series to be accepted?
> 
> I'm waiting for Ian to confirm if his concerns are addressed.

Sorry, yes, I didn't mean to block this with my questions.  I should
hzve given my ack earlier.

All three:

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/3] tools: support autoballooning of xenstore domain [and 1 more messages]
  2016-09-06 10:09     ` [PATCH 0/3] tools: support autoballooning of xenstore domain [and 1 more messages] Ian Jackson
@ 2016-09-06 10:45       ` Wei Liu
  0 siblings, 0 replies; 15+ messages in thread
From: Wei Liu @ 2016-09-06 10:45 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Juergen Gross, stefano.stabellini, Wei Liu, xen-devel

On Tue, Sep 06, 2016 at 11:09:42AM +0100, Ian Jackson wrote:
> Wei Liu writes ("Re: [Xen-devel] [PATCH 0/3] tools: support autoballooning of xenstore domain"):
> > On Mon, Aug 29, 2016 at 08:22:14AM +0200, Juergen Gross wrote:
> > > So Mini-OS ballooning is available now. Anything missing from my side
> > > for this series to be accepted?
> > 
> > I'm waiting for Ian to confirm if his concerns are addressed.
> 
> Sorry, yes, I didn't mean to block this with my questions.  I should
> hzve given my ack earlier.
> 
> All three:
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks.

I've pushed this series.

Juergen, patch 2 conflicts with the XEN_INTERFACE_VERSION change. It is
rather obvious so I've fixed it up. Please check and shout if my fix is
not correct.

Wei.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-09-06 10:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-08  8:28 [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross
2016-08-08  8:28 ` [PATCH 1/3] tools: add --maxmem parameter to init-xenstore-domain Juergen Gross
2016-08-11 17:03   ` Wei Liu
2016-08-08  8:28 ` [PATCH 2/3] stubdom: add CONFIG_BALLOON to xenstore config Juergen Gross
2016-08-11 17:03   ` Wei Liu
2016-08-08  8:28 ` [PATCH 3/3] tools: add config parameter for maximum memory of xenstore domain Juergen Gross
2016-08-11 17:03   ` Wei Liu
2016-08-08 14:45 ` [PATCH 0/3] tools: support autoballooning " Ian Jackson
2016-08-08 17:31   ` Juergen Gross
2016-08-24 11:12     ` Wei Liu
2016-08-29  6:22 ` Juergen Gross
2016-08-29  8:52   ` Wei Liu
2016-09-06 10:09     ` [PATCH 0/3] tools: support autoballooning of xenstore domain [and 1 more messages] Ian Jackson
2016-09-06 10:45       ` Wei Liu
2016-09-06 10:01 ` [PATCH 0/3] tools: support autoballooning of xenstore domain Juergen Gross

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