Skip to contentSkip to conversation

x86: make the dom0_max_vcpus option more flexible

PATCH In review David Vrabel 2 participants 2 messages Sep 10, 2012 – Sep 11, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: make the dom0_max_vcpus option more flexible

From: David Vrabel <[email protected]>

The dom0_max_vcpus command line option only allows the exact number of VCPUs for dom0 to be set. It is not possible to say "up to N VCPUs but no more than the number physically present."

Allow a range for the option to set a minimum number of VCPUs, and a maximum which does not exceed the number of PCPUs.

For example, with "dom0_max_vcpus=4-8":

PCPUs Dom0 VCPUs
2 4
4 4
6 6
8 8
10 8

Existing command lines with "dom0_max_vcpus=N" still work as before (and are equivalent to dom0_max_vcpus=N-N).

---
Changes since v2:
- none, repost for Xen 4.3

---
 docs/misc/xen-command-line.markdown |   29 +++++++++++++++++++++--
 xen/arch/x86/domain_build.c         |   43 +++++++++++++++++++++++++---------
 2 files changed, 57 insertions(+), 15 deletions(-)
docs/misc/xen-command-line.markdown +26 -3
index 6599931..97a2bb2 100644
@@ -383,10 +383,33 @@ Specify the bit width of the DMA heap.
 Specify a list of IO ports to be excluded from dom0 access.
 
 ### dom0\_max\_vcpus
-> `= <integer>`
 
-Specify the maximum number of vcpus to give to dom0.  This defaults
-to the number of pcpus on the host.
+Either:
+
+> `= <integer>`.
+
+The number of VCPUs to give to dom0.  This number of VCPUs can be more
+than the number of PCPUs on the host.  The default is the number of
+PCPUs.
+
+Or:
+
+> `= <min>-<max>` where `<min>` and `<max>` are integers.
+
+Gives dom0 a number of VCPUs equal to the number of PCPUs, but always
+at least `<min>` and no more than `<max>`.  Using `<min>` may give
+more VCPUs than PCPUs.  `<min>` or `<max>` may be omitted and the
+defaults of 1 and unlimited respectively are used instead.
+
+For example, with `dom0_max_vcpus=4-8`:
+
+     Number of
+  PCPUs | Dom0 VCPUs
+   2    |  4
+   4    |  4
+   6    |  6
+   8    |  8
+  10    |  8
 
 ### dom0\_mem
 > `= List of ( min:<size> | max:<size> | <size> )`
xen/arch/x86/domain_build.c +31 -12

72 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 19 lines
Quoted 1 line
Quoted 1 line · David Vrabel

From: David Vrabel <[email protected]>

The dom0_max_vcpus command line option only allows the exact number of VCPUs for dom0 to be set. It is not possible to say "up to N VCPUs but no more than the number physically present."

Allow a range for the option to set a minimum number of VCPUs, and a maximum which does not exceed the number of PCPUs.

For example, with "dom0_max_vcpus=4-8":

PCPUs Dom0 VCPUs
2 4
4 4
6 6
8 8
10 8

Quoted 8 lines

Existing command lines with "dom0_max_vcpus=N" still work as before (and are equivalent to dom0_max_vcpus=N-N).

---
Changes since v2:
- none, repost for Xen 4.3

Thanks for resending - it didn't get lost, just didn't get around to apply it yet as I first wanted to have it in my local tree for a short while.

Jan