Skip to contentSkip to conversation

docs: improve documentation for the the dom0_mem command line option

PATCH Superseded David Vrabel 3 participants 3 messages Mar 21, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: improve documentation for the the dom0_mem command line option

From: David Vrabel <[email protected]>

---
 docs/misc/xen-command-line.markdown |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 deletions(-)
docs/misc/xen-command-line.markdown +18 -9
index beb8462..c697d68 100644
@@ -8,7 +8,7 @@ This document coveres the command line options which the Xen Hypervisor.
 
 Most parameters take the form `option=value`.  Different options on the command line should be space delimited.
 
-### Boolean
+### Boolean (`<boolean>`)
 
 All boolean option may be explicitly enabled using a `value` of
 > `yes`, `on`, `true`, `enable` or `1`
@@ -29,11 +29,11 @@ Disable x2apic support (if present)
 Enable synchronous console mode
 > `sync_console`
 
-### Integer
+### Integer (`<integer>`)
 
 An integer parameter will default to decimal and may be prefixed with a `-` for negative numbers.  Alternativly, a hexidecimal number may be used by prefixing the number with `0x`, or an octal number may be used if a leading `0` is present.
 
-### Size
+### Size (`<size>`)
 
 A size parameter may be any integer, with a size suffix
 
@@ -96,7 +96,7 @@ Increase the verbosity of the APIC code from the default value.
 ### ats
 ### availmem
 ### badpage
-> `= List of [ <integer> | <ingeter>-<integer> ]`
+> `= List of [ <integer> | <integer>-<integer> ]`
 
 Specify that certain pages, or certain ranges of pages contain bad bytes and should not be used.  For example, if your memory tester says that byte `0x12345678` is bad, you would place `badpage=0x12345` on Xen's command line.
 
@@ -219,13 +219,22 @@ Specifiy the maximum number of vcpus to give to dom0.  This defaults to the numb
 Specify the total size for dom0.
 
 ### dom0\_mem (x86)
-> `= List of ( min:<value> | max: <value> | <value> )`
+> `= List of ( min:<size> | max:<size> | <size> )`
 
-each `<value>` is a size parameter.  If the size is positive, it represents an absolute value.  If the size is negative, the size specified is subtracted from the total available memory.
+Set the amount of memory for the initial domain (dom0). If a size is
+positive, it represents an absolute value.  If a size is negative, the
+size specified is subtracted from the total available memory.
 
-* `min:<value>` specifies the minimum amount of memory allocated to dom0.
-* `max:<value>` specifies the maximum amount of memory allocated to dom0.
-* `<value>` specified the exact amount of memory allocated to dom0.
+* `min:<size>` specifies the minimum amount of memory allocated to dom0.
+* `max:<size>` specifies the maximum amount of memory allocated to dom0.
+* `<size>` specified the exact amount of memory allocated to dom0.
+
+`max:<size>` also sets the maximum reservation (the maximum amount of
+memory dom0 can balloon up to).  If this is omitted then the maximum
+reservation is unlimited.
+
+For example, to set dom0's memory to 512 MB but no more than 1 GB use
+`dom0_mem=512M,max:1G`.
 
 ### dom0\_shadow
 ### dom0\_vcpus\_pin
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 50 lines · David Vrabel

From: David Vrabel <[email protected]>

---
 docs/misc/xen-command-line.markdown |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 deletions(-)
docs/misc/xen-command-line.markdown +5 -5
index beb8462..c697d68 100644
@@ -8,7 +8,7 @@ This document coveres the command line options which the Xen Hypervisor.
 
 Most parameters take the form `option=value`.  Different options on the command line should be space delimited.
 
-### Boolean
+### Boolean (`<boolean>`)
 
 All boolean option may be explicitly enabled using a `value` of
 > `yes`, `on`, `true`, `enable` or `1`
@@ -29,11 +29,11 @@ Disable x2apic support (if present)
 Enable synchronous console mode
 > `sync_console`
 
-### Integer
+### Integer (`<integer>`)
 
 An integer parameter will default to decimal and may be prefixed with a `-` for negative numbers.  Alternativly, a hexidecimal number may be used by prefixing the number with `0x`, or an octal number may be used if a leading `0` is present.
 
-### Size
+### Size (`<size>`)
 
 A size parameter may be any integer, with a size suffix
 
@@ -96,7 +96,7 @@ Increase the verbosity of the APIC code from the default value.
 ### ats
 ### availmem
 ### badpage
-> `= List of [ <integer> | <ingeter>-<integer> ]`
+> `= List of [ <integer> | <integer>-<integer> ]`
 
 Specify that certain pages, or certain ranges of pages contain bad bytes and should not be used.  For example, if your memory tester says that byte `0x12345678` is bad, you would place `badpage=0x12345` on Xen's command line.
 
@@ -219,13 +219,22 @@ Specifiy the maximum number of vcpus to give to dom0.  This defaults to the numb
 Specify the total size for dom0.
 
 ### dom0\_mem (x86)
-> `= List of ( min:<value> | max: <value> | <value> )`
+> `= List of ( min:<size> | max:<size> | <size> )`
 

docs/misc/xen-command-line.markdown Specifiy the maximum number of vcpus to give to dom0. This defaults to the numb · line 229

Quoted 10 lines
docs/misc/xen-command-line.markdown +5 -4
-each `<value>` is a size parameter.  If the size is positive, it represents an absolute value.  If the size is negative, the size specified is subtracted from the total available memory.
+Set the amount of memory for the initial domain (dom0). If a size is
+positive, it represents an absolute value.  If a size is negative, the
+size specified is subtracted from the total available memory.
 
-* `min:<value>` specifies the minimum amount of memory allocated to dom0.
-* `max:<value>` specifies the maximum amount of memory allocated to dom0.
-* `<value>` specified the exact amount of memory allocated to dom0.
+* `min:<size>` specifies the minimum amount of memory allocated to dom0.
+* `max:<size>` specifies the maximum amount of memory allocated to dom0.

This means "max:<size> => min(<size>,<actual-host-ram>)" and min vice versa, right?

Or does min fail/panic if host-ram less than the given size?

docs/misc/xen-command-line.markdown Specifiy the maximum number of vcpus to give to dom0. This defaults to the numb · line 230

Quoted 1 line
docs/misc/xen-command-line.markdown +1 -0
+* `<size>` specified the exact amount of memory allocated to dom0.

specifies

If you give both min: and max: but not this which takes precedence?

docs/misc/xen-command-line.markdown Specifiy the maximum number of vcpus to give to dom0. This defaults to the numb · line 237

Quoted 6 lines
docs/misc/xen-command-line.markdown +6 -0
+`max:<size>` also sets the maximum reservation (the maximum amount of
+memory dom0 can balloon up to).  If this is omitted then the maximum
+reservation is unlimited.
+
+For example, to set dom0's memory to 512 MB but no more than 1 GB use
+`dom0_mem=512M,max:1G`.

Perhaps:

For example, to set dom0's initial memory allocation to 512MB but allow it to balloon up as far as 1GB use dom0_mem=512M,max:1G

Ian.

Quoted 3 lines
docs/misc/xen-command-line.markdown +0 -0
 ### dom0\_shadow
 ### dom0\_vcpus\_pin
#2 lore raw
Quoted 15 lines
Quoted 1 line
Quoted 1 line · Ian Campbell

docs/misc/xen-command-line.markdown Specifiy the maximum number of vcpus to give to dom0. This defaults to the numb · line 229

Quoted 9 lines · David Vrabel
docs/misc/xen-command-line.markdown +5 -3
+Set the amount of memory for the initial domain (dom0). If a size is
+positive, it represents an absolute value.  If a size is negative, the
+size specified is subtracted from the total available memory.
 
-* `min:<value>` specifies the minimum amount of memory allocated to dom0.
-* `max:<value>` specifies the maximum amount of memory allocated to dom0.
-* `<value>` specified the exact amount of memory allocated to dom0.
+* `min:<size>` specifies the minimum amount of memory allocated to dom0.
+* `max:<size>` specifies the maximum amount of memory allocated to dom0.

This means "max:<size> => min(<size>,<actual-host-ram>)" and min vice versa, right?

Quoted 1 line

Or does min fail/panic if host-ram less than the given size?

It would likely panic in that case, as it would try to allocate as much as was available when the allocation size was calculated, and that size could have been slightly off wrt what is available at the point the allocation is actually done.

Quoted 5 lines
Quoted 1 line

+* <size> specified the exact amount of memory allocated to dom0.

specifies

If you give both min: and max: but not this which takes precedence?

nr = min(max(<nr>, <min>), <max>, <avail>)

(But I think it really ought to be

nr = max(min(<nr>, <max>, <avail>), <min>)

i.e. honor the specified minimum even if less memory is available. And of course <max> < <min> should get a defined treatment too.)

Jan