Re: [Autotest] [PATCH] KVM test: Add cpu_hotplug subtest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 24, 2011 at 1:25 AM, pradeep <psuriset@xxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 24 Aug 2011 01:05:13 -0300
> Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx> wrote:
>
>> Tests the ability of adding virtual cpus on the fly to qemu using
>> the monitor command cpu_set, then after everything is OK, run the
>> cpu_hotplug testsuite on the guest through autotest.
>>
>> Updates: As of the latest qemu-kvm (08-24-2011) HEAD, trying to
>> online more CPUs than the ones already available leads to qemu
>> hanging:
>>
>> File /home/lmr/Code/autotest-git/client/virt/kvm_monitor.py, line
>> 279, in cmd raise MonitorProtocolError(msg)
>> MonitorProtocolError: Could not find (qemu) prompt after command
>> cpu_set 2 online. Output so far: ""
>>
>> Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
>> ---
>>  client/tests/kvm/tests/cpu_hotplug.py  |   99
>> ++++++++++++++++++++++++++++++++
>> client/tests/kvm/tests_base.cfg.sample |    7 ++ 2 files changed, 106
>> insertions(+), 0 deletions(-) create mode 100644
>> client/tests/kvm/tests/cpu_hotplug.py
>>
>> diff --git a/client/tests/kvm/tests/cpu_hotplug.py
>> b/client/tests/kvm/tests/cpu_hotplug.py new file mode 100644
>> index 0000000..fa75c9b
>> --- /dev/null
>> +++ b/client/tests/kvm/tests/cpu_hotplug.py
>> @@ -0,0 +1,99 @@
>> +import os, logging, re
>> +from autotest_lib.client.common_lib import error
>> +from autotest_lib.client.virt import virt_test_utils
>> +
>> +
>> +@error.context_aware
>> +def run_cpu_hotplug(test, params, env):
>> +    """
>> +    Runs CPU hotplug test:
>> +
>> +    1) Pick up a living guest
>> +    2) Send the monitor command cpu_set [cpu id] for each cpu we
>> wish to have
>> +    3) Verify if guest has the additional CPUs showing up under
>> +        /sys/devices/system/cpu
>> +    4) Try to bring them online by writing 1 to the 'online' file
>> inside that dir
>> +    5) Run the CPU Hotplug test suite shipped with autotest inside
>
> It looks good to me.  How about adding
>        1) off-lining of vcpu.
>        2) Frequent offline-online of vcpus.  some thing like below.
>
> #!/bin/sh
>
> SYS_CPU_DIR=/sys/devices/system/cpu
>
> VICTIM_IRQ=15
> IRQ_MASK=f0
>
> iteration=0
> while true; do
>  echo $iteration
>  echo $IRQ_MASK > /proc/irq/$VICTIM_IRQ/smp_affinity
>  for cpudir in $SYS_CPU_DIR/cpu[1-9]; do
>    echo 0 > $cpudir/online
>  done
>  for cpudir in $SYS_CPU_DIR/cpu[1-9]; do
>    echo 1 > $cpudir/online
>  done
>  iteration=`expr $iteration + 1`
> done

Ok, I'll look into implementing your suggestion as well, thanks!
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux