From: Ryan Grimm <grimm@us.ibm.com>
To: Xen Devel <xen-devel@lists.xensource.com>
Subject: [PATCH] separates config's 'vcpus' into 'max_vcpus' and 'vcpus'
Date: Mon, 13 Mar 2006 10:29:07 -0600 [thread overview]
Message-ID: <20060313162907.GA29286@localhost.localdomain> (raw)
Hi,
This breaks 'vcpus' in xm config file into
-max_vcpus - the max # of vcpus a domain can have in its life
-vcpus - the initial # of vcpus a domain brings up
it won't break any config file that's missing 'max_vcpus'
Thanks,
Ryan
Signed-off-by: Ryan Grimm <grimm@us.ibm.com>
diff -r d8451bb6278c -r 4407086dc27e tools/examples/xmexample1
--- a/tools/examples/xmexample1 Wed Mar 1 16:52:37 2006
+++ b/tools/examples/xmexample1 Thu Mar 2 00:03:20 2006
@@ -26,6 +26,9 @@
#cpus = "" # leave to Xen to pick
#cpus = "0" # all vcpus run on CPU0
#cpus = "0-3,5,^1" # run on cpus 0,2,3,5
+
+# Max number of Virtual CPUS a domain can have in its life
+#max_vcpus = 8
# Number of Virtual CPUS to use, default is 1
#vcpus = 1
diff -r d8451bb6278c -r 4407086dc27e tools/examples/xmexample2
--- a/tools/examples/xmexample2 Wed Mar 1 16:52:37 2006
+++ b/tools/examples/xmexample2 Thu Mar 2 00:03:20 2006
@@ -56,6 +56,9 @@
#cpus = "0" # all vcpus run on CPU0
#cpus = "0-3,5,^1" # run on cpus 0,2,3,5
#cpus = "%s" % vmid # set based on vmid (mod number of CPUs)
+
+# Max number of Virtual CPUS a domain can have in its life
+max_vcpus = 8
# Number of Virtual CPUS to use, default is 1
#vcpus = 1
diff -r d8451bb6278c -r 4407086dc27e tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Wed Mar 1 16:52:37 2006
+++ b/tools/python/xen/xend/XendDomainInfo.py Thu Mar 2 00:03:20 2006
@@ -121,6 +121,7 @@
('uuid', str),
('ssidref', int),
('vcpus', int),
+ ('max_vcpus', int),
('vcpu_avail', int),
('cpu_weight', float),
('memory', int),
@@ -551,6 +552,7 @@
avail = int(1)
defaultInfo('vcpus', lambda: avail)
+ defaultInfo('max_vcpus', lambda: 8)
defaultInfo('online_vcpus', lambda: self.info['vcpus'])
defaultInfo('max_vcpu_id', lambda: self.info['vcpus']-1)
defaultInfo('vcpu_avail', lambda: (1 << self.info['vcpus']) - 1)
@@ -704,7 +706,7 @@
return 'offline'
result = {}
- for v in range(0, self.info['vcpus']):
+ for v in range(0, self.info['max_vcpus']):
result["cpu/%d/availability" % v] = availability(v)
return result
@@ -1154,7 +1156,7 @@
self.recreateDom()
# Set maximum number of vcpus in domain
- xc.domain_max_vcpus(self.domid, int(self.info['vcpus']))
+ xc.domain_max_vcpus(self.domid, int(self.info['max_vcpus']))
def introduceDomain(self):
diff -r d8451bb6278c -r 4407086dc27e tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Wed Mar 1 16:52:37 2006
+++ b/tools/python/xen/xm/create.py Thu Mar 2 00:03:20 2006
@@ -176,6 +176,10 @@
gopts.var('apic', val='APIC',
fn=set_int, default=0,
use="Disable or enable APIC of HVM domain.")
+
+gopts.var('max_vcpus', val='VCPUS',
+ fn=set_int, default=8,
+ use="max # of Virtual CPUS a domain will have in its life.")
gopts.var('vcpus', val='VCPUS',
fn=set_int, default=1,
@@ -587,7 +591,8 @@
config.append([n, v])
map(add_conf, ['name', 'memory', 'ssidref', 'maxmem', 'restart',
- 'on_poweroff', 'on_reboot', 'on_crash', 'vcpus'])
+ 'on_poweroff', 'on_reboot', 'on_crash', 'vcpus',
+ 'max_vcpus'])
if vals.uuid is not None:
config.append(['uuid', vals.uuid])
next reply other threads:[~2006-03-13 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 16:29 Ryan Grimm [this message]
2006-03-13 16:36 ` [PATCH] separates config's 'vcpus' into 'max_vcpus' and 'vcpus' Daniel Stekloff
2006-03-13 21:38 ` Ryan Grimm
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=20060313162907.GA29286@localhost.localdomain \
--to=grimm@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
/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.