Skip to contentSkip to conversation

Seperate smp from extra_params and add into default VM params

PATCH In review Yolkfull Chow 2 participants 2 messages Nov 3, 2009 – Nov 10, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Seperate smp from extra_params and add into default VM params

We may need leave smp as standalone parameter of VM. Reasons I can proposal:
1) memory is a standalone parameter, so is smp
2) smp parameter is needed in some test case, say VM params_verify

---
 client/tests/kvm/kvm_tests.cfg.sample |    3 ++-
 client/tests/kvm/kvm_vm.py            |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_tests.cfg.sample +2 -1
index 573206c..c16b615 100644
@@ -18,6 +18,7 @@ kill_unresponsive_vms = yes
 # Some default VM params
 qemu_binary = qemu
 qemu_img_binary = qemu-img
+smp = 1
 mem = 512
 image_size = 10G
 shell_port = 22
@@ -751,7 +752,7 @@ variants:
     - @up:
         no autotest.npb
     - smp2:
-        extra_params += " -smp 2"
+        smp = 2
         used_cpus = 2
         stress_boot: used_cpus = 10
         timedrift.with_load: used_cpus = 100
client/tests/kvm/kvm_vm.py +4 -0
index ee6796b..0b7a81e 100755
@@ -261,6 +261,10 @@ class VM:
         if mem:
             qemu_cmd += " -m %s" % mem
 
+        smp = params.get("smp")
+        if smp:
+            qemu_cmd += " -smp %s" % smp
+
         iso = params.get("cdrom")
         if iso:
             iso = kvm_utils.get_path(root_dir, iso)
Signature · 1 line
1.6.5.1
#1 lore raw

I am OK with it, applied, thanks!

Quoted 55 lines · Yolkfull Chow

We may need leave smp as standalone parameter of VM. Reasons I can proposal:
 1) memory is a standalone parameter, so is smp
 2) smp parameter is needed in some test case, say VM params_verify

---
 client/tests/kvm/kvm_tests.cfg.sample |    3 ++- client/tests/kvm/kvm_vm.py            |    4 ++++

 2 files changed, 6 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_tests.cfg.sample +0 -0
index 573206c..c16b615 100644
@@ -18,6 +18,7 @@ kill_unresponsive_vms = yes
  # Some default VM params

 qemu_binary = qemu
 qemu_img_binary = qemu-img
+smp = 1
 mem = 512
 image_size = 10G
 shell_port = 22

client/tests/kvm/kvm_tests.cfg.sample +0 -0
@@ -751,7 +752,7 @@ variants:

    - @up:
        no autotest.npb
    - smp2:
-        extra_params += " -smp 2"
+        smp = 2
        used_cpus = 2
        stress_boot: used_cpus = 10
        timedrift.with_load: used_cpus = 100

client/tests/kvm/kvm_vm.py +0 -0
index ee6796b..0b7a81e 100755
@@ -261,6 +261,10 @@ class VM:

        if mem:
            qemu_cmd += " -m %s" % mem

+        smp = params.get("smp")
+        if smp:
+            qemu_cmd += " -smp %s" % smp
+
        iso = params.get("cdrom")
        if iso:
            iso = kvm_utils.get_path(root_dir, iso) --
1.6.5.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Lucas