Skip to contentSkip to conversation

xl.cfg: document the maxmem= option

PATCH In review Olaf Hering 4 participants 8 messages May 4, 2012 – May 8, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl.cfg: document the maxmem= option

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

docs/man/xl.cfg.pod.5 +8 -4
diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.
+In combination with the memory= option it will enable the PoD (populate
+on demand) mode for the guest iff the values of memory= and maxmem=
+differ. The guest needs a balloon driver in this case. The value of
+maxmem= must be equal or greater than memory=.
+
 =back
 
 =head3 Processor and Platform Features
@@ -955,10 +963,6 @@ XXX
 
 XXX
 
-=item B<maxmem=NUMBER>
-
-XXX
-
 =item B<nodes=XXX>
 
 XXX
#1 lore raw
Quoted 13 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5

docs/man/xl.cfg.pod.5 are not using hardware assisted paging ( · line 489

Quoted 6 lines
docs/man/xl.cfg.pod.5 +3 -0
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.

Isn't it also for PV guests (though without the PoD functionality)?

Quoted 24 lines
docs/man/xl.cfg.pod.5 +5 -4
+In combination with the memory= option it will enable the PoD (populate
+on demand) mode for the guest iff the values of memory= and maxmem=
+differ. The guest needs a balloon driver in this case. The value of
+maxmem= must be equal or greater than memory=.
+
 =back
 
 =head3 Processor and Platform Features
@@ -955,10 +963,6 @@ XXX
 
 XXX
 
-=item B<maxmem=NUMBER>
-
-XXX
-
 =item B<nodes=XXX>
 
 XXX

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 16 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5

docs/man/xl.cfg.pod.5 +0 -0
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
Quoted 5 lines

docs/man/xl.cfg.pod.5 are not using hardware assisted paging ( · line 489

Quoted 3 lines
docs/man/xl.cfg.pod.5 +3 -0
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.

Isn't it also for PV guests (though without the PoD functionality)?

Now that I look again at libxl__build_pre(), it appearently does also something for PV guests. I will resend the patch.
Thanks for the review.

Olaf

#3 lore raw
Quoted 19 lines · Olaf Hering
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 16 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5

docs/man/xl.cfg.pod.5 +0 -0
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
Quoted 8 lines
Quoted 5 lines

docs/man/xl.cfg.pod.5 are not using hardware assisted paging ( · line 489

Quoted 3 lines
docs/man/xl.cfg.pod.5 +3 -0
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.

Isn't it also for PV guests (though without the PoD functionality)?

Now that I look again at libxl__build_pre(), it appearently does also something for PV guests.

Right. Some people call this booting "pre-ballooned". Essentially n PV the balloon driver can be initialised early enough that something like PoD is not required -- the missing pages are just incorporated directly into the balloon.

(strictly speaking the balloon driver isn't actually initialised early, but rather the pages are reserved/set-aside for it very early on).

Ian.

#4 lore raw
Quoted 26 lines · Ian Campbell
Quoted 25 lines · Olaf Hering
Quoted 22 lines · Konrad Rzeszutek Wilk
Quoted 13 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5

docs/man/xl.cfg.pod.5 are not using hardware assisted paging ( · line 489

Quoted 6 lines
docs/man/xl.cfg.pod.5 +3 -0
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.

Isn't it also for PV guests (though without the PoD functionality)?

Quoted 7 lines
Quoted 2 lines

Now that I look again at libxl__build_pre(), it appearently does also something for PV guests.

Right. Some people call this booting "pre-ballooned". Essentially n PV the balloon driver can be initialised early enough that something like PoD is not required -- the missing pages are just incorporated directly into the balloon.

What about this wording?

Specifies the maximum amount of memory a guest can ever see.
The value of maxmem= must be equal or greater than memory=.
In combination with the memory= option it will start the guest "pre-ballooned".
In a HVM guest it will enable the PoD (populate on demand) mode, iff the values of memory= and maxmem= differ. The guest needs a balloon driver in this case, without a balloon driver it will crash.

Olaf

#5 lore raw
In reply to Ian Campbell
Quoted 26 lines

From: Ian Campbell [mailto:[email protected]]
Sent: Sunday, May 06, 2012 3:36 AM
To: Olaf Hering
Cc: [email protected]; Konrad Rzeszutek Wilk
Subject: Re: [Xen-devel] [PATCH] xl.cfg: document the maxmem= option

Quoted 19 lines · Olaf Hering
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 16 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5

docs/man/xl.cfg.pod.5 +0 -0
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

docs/man/xl.cfg.pod.5 are not using hardware assisted paging ( · line 489

Quoted 3 lines
docs/man/xl.cfg.pod.5 +3 -0
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.

can _ever_ see...

What about guest OS's that support hotplug memory?

Also, a subtle point, but is this the maximum physical address that will contain read/write pages or the maximum amount of RAM that the guest OS should be prepared to map as read/writeable (e.g. after subtracting off reserved e820 ranges) or ???

#6 lore raw
Quoted 26 lines · Dan Magenheimer
Quoted 26 lines

From: Ian Campbell [mailto:[email protected]]
Sent: Sunday, May 06, 2012 3:36 AM
To: Olaf Hering
Cc: [email protected]; Konrad Rzeszutek Wilk
Subject: Re: [Xen-devel] [PATCH] xl.cfg: document the maxmem= option

Quoted 19 lines · Olaf Hering
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 16 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5

docs/man/xl.cfg.pod.5 +0 -0
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

docs/man/xl.cfg.pod.5 are not using hardware assisted paging ( · line 489

Quoted 3 lines
docs/man/xl.cfg.pod.5 +3 -0
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.

can _ever_ see...

What about guest OS's that support hotplug memory?

Does the toolstack (need to) expose the capability to drive that as a host admin? I don't think xl does... In which case this wording can be tweaked when that feature is added?

Quoted 4 lines

Also, a subtle point, but is this the maximum physical address that will contain read/write pages or the maximum amount of RAM that the guest OS should be prepared to map as read/writeable (e.g. after subtracting off reserved e820 ranges) or ???

I think it is total number of memory pages, not the maximum PFN. e.g. the maximum address might be 4.5GB on a 4GB machine with a PCI hole.

I *think*...

Ian.

#7 lore raw
Quoted 39 lines

From: Ian Campbell [mailto:[email protected]]
Sent: Tuesday, May 08, 2012 6:41 AM
To: Dan Magenheimer
Cc: Olaf Hering; [email protected]; Konrad Wilk
Subject: RE: [Xen-devel] [PATCH] xl.cfg: document the maxmem= option

Quoted 32 lines · Dan Magenheimer
Quoted 26 lines

From: Ian Campbell [mailto:[email protected]]
Sent: Sunday, May 06, 2012 3:36 AM
To: Olaf Hering
Cc: [email protected]; Konrad Rzeszutek Wilk
Subject: Re: [Xen-devel] [PATCH] xl.cfg: document the maxmem= option

Quoted 19 lines · Olaf Hering
Quoted 17 lines · Konrad Rzeszutek Wilk
Quoted 16 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1336159720 -7200
# Node ID c414728d0d12f1c3e416e40cceefca2f0b00578e # Parent 8f556a70ae0bef47e242f9e7be0a054769fc8277 xl.cfg: document the maxmem= option

diff -r 8f556a70ae0b -r c414728d0d12 docs/man/xl.cfg.pod.5

docs/man/xl.cfg.pod.5 +0 -0
@@ -484,6 +484,14 @@ are not using hardware assisted paging (
 mode) and your guest workload consists of a a very large number of
 similar processes then increasing this value may improve performance.
 
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

docs/man/xl.cfg.pod.5 are not using hardware assisted paging ( · line 489

Quoted 3 lines
docs/man/xl.cfg.pod.5 +3 -0
+=item B<maxmem=MBYTES>
+
+Specifies the maximum amount of memory the HVM guest can ever see.

can _ever_ see...

Quoted 5 lines
Quoted 1 line

What about guest OS's that support hotplug memory?

Does the toolstack (need to) expose the capability to drive that as a host admin? I don't think xl does... In which case this wording can be tweaked when that feature is added?

I don't know if the matching support ever was implemented in xl, but hotplug memory support for Xen is in upstream Linux.

http://lists.xen.org/archives/html/xen-devel/2011-05/msg01060.html

If it _is_ in xl, "can ever see" seems a bit too strong... maybe something like "memory the HVM guest can see unless changed later via 'xl mem-max'" or "memory the HVM guest can see when it boots" would be better.

But this is a nit. It's impossible to both be precise and brief in descriptions such as these.

Quoted 9 lines
Quoted 4 lines

Also, a subtle point, but is this the maximum physical address that will contain read/write pages or the maximum amount of RAM that the guest OS should be prepared to map as read/writeable (e.g. after subtracting off reserved e820 ranges) or ???

I think it is total number of memory pages, not the maximum PFN. e.g. the maximum address might be 4.5GB on a 4GB machine with a PCI hole.

I *think*...

OK. If so, then the proposed wording is fine, though maybe adding one word "maximum amount of _usable_ memory" might help.