diff mbox series

vm_pw_mgmt_policy: fixes core mask and driver

Message ID 20210423101420.2991473-1-zbigniewx.sikora@intel.com (mailing list archive)
State New
Headers show
Series vm_pw_mgmt_policy: fixes core mask and driver | expand

Commit Message

Zbigniew Sikora April 23, 2021, 10:14 a.m. UTC
1. Now vm_power_manager only grants access to the cores listed
   in its coremask, so change core number to be the one
   from vm_power_mgr core mask.
2. Replaced driver igb_uio to vfio-pci
3. Resetsynchronize system clock after the test completion.

Relevant DPDK patch:
http://patches.dpdk.org/project/dpdk/patch/20210115125250.22416-1-david.hunt@intel.com/

Signed-off-by: Zbigniew Sikora <zbigniewx.sikora@intel.com>

--
1.8.3.1

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.

Comments

Pattan, Reshma April 23, 2021, 11:35 a.m. UTC | #1
> -----Original Message-----
> From: Sikora, ZbigniewX <zbigniewx.sikora@intel.com>
mask and driver
> 
> 1. Now vm_power_manager only grants access to the cores listed
>    in its coremask, so change core number to be the one

Hi Zbigniew,

I appreciate you sent this, but IMO, I can  send this change as a v2 version to the patch(link below) that I already sent to mailing list.  
http://patchwork.dpdk.org/project/dts/patch/20210407081807.29110-4-reshma.pattan@intel.com/
I cannot send my v2 till the below dpdk fix is applied to the dpdk repo , so I am waiting for that to happen.
http://patches.dpdk.org/project/dpdk/patch/20210421104534.17768-1-reshma.pattan@intel.com/

So, if you happen to spin v2 on this patch you can remove this change from this patch. 

Thanks,
Reshma
Pattan, Reshma May 6, 2021, 10:51 a.m. UTC | #2
> -----Original Message-----
> To: Sikora, ZbigniewX <zbigniewx.sikora@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH] vm_pw_mgmt_policy: fixes core mask and driver


> Hi Zbigniew,
> 
> I appreciate you sent this, but IMO, I can  send this change as a v2 version to the
> patch(link below) that I already sent to mailing list.
> http://patchwork.dpdk.org/project/dts/patch/20210407081807.29110-4-
> reshma.pattan@intel.com/
> I cannot send my v2 till the below dpdk fix is applied to the dpdk repo , so I am
> waiting for that to happen.
> http://patches.dpdk.org/project/dpdk/patch/20210421104534.17768-1-
> reshma.pattan@intel.com/
> 
> So, if you happen to spin v2 on this patch you can remove this change from this
> patch.

I marked my patch as Rejected, so your patch is good to go. 

Tested-By: Reshma Pattan <reshma.pattan@intel.com>
diff mbox series

Patch

diff --git a/test_plans/vm_pw_mgmt_policy_test_plan.rst b/test_plans/vm_pw_mgmt_policy_test_plan.rst
index cfbfe96..98894ff 100644
--- a/test_plans/vm_pw_mgmt_policy_test_plan.rst
+++ b/test_plans/vm_pw_mgmt_policy_test_plan.rst
@@ -172,7 +172,7 @@  Set up testing environment
     export RTE_TARGET=x86_64-native-linuxapp-gcc
     make -C examples/vm_power_manager

-   ./examples/vm_power_manager/build/vm_power_mgr -c 0x7 -n 4
+   ./examples/vm_power_manager/build/vm_power_mgr -c 0xffff -n 4

     vmpower> add_vm <vm_name>
     vmpower> add_channels <vm_name> all
@@ -195,7 +195,7 @@  Set up testing environment
     make -C examples/vm_power_manager/guest_cli

    ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr \
-   -c 0x1f -n 4 --file-prefix=vmpower2 -- -i --vm-name=<vm name> \
+   -c 0xff -n 4 --file-prefix=vmpower2 -- -i --vm-name=<vm name> \
    --policy=<policy name> --vcpu-list=<vcpus list> --busy-hours=<time stage>

     options description::
diff --git a/tests/TestSuite_vm_pw_mgmt_policy.py b/tests/TestSuite_vm_pw_mgmt_policy.py
index 9abcafd..f074f6d 100644
--- a/tests/TestSuite_vm_pw_mgmt_policy.py
+++ b/tests/TestSuite_vm_pw_mgmt_policy.py
@@ -311,7 +311,7 @@  class TestVmPwMgmtPolicy(TestCase):
                 'name': ch_name.format(cnt)}
             self.vm.add_vm_virtio_serial_channel(**channel)
         # set vm default driver
-        self.vm.def_driver = 'igb_uio'
+        self.vm.def_driver = 'vfio-pci'
         # boot up vm
         self.vm_dut = self.vm.start()
         self.is_vm_on = True
@@ -348,7 +348,7 @@  class TestVmPwMgmtPolicy(TestCase):
             '-v '
             '-c {core_mask} '
             '-n {mem_channel} ').format(**{
-                'core_mask': self.get_cores_mask("1S/3C/1T"),
+                'core_mask': self.get_cores_mask("1S/12C/1T"),
                 'mem_channel': self.dut.get_memory_channels(), })
         prompt = 'vmpower>'
         cmd = [' '.join([self.vm_power_mgr, eal_option]), prompt, 30]
@@ -566,7 +566,7 @@  class TestVmPwMgmtPolicy(TestCase):
         drv_name = output.splitlines()[0].strip()
         return drv_name

-    def get_linux_cpu_attrs(self, core_num, name="cpuinfo_cur_freq"):
+    def get_linux_cpu_attrs(self, core_num, name="scaling_setspeed"):
         freq_path = "/sys/devices/system/cpu/cpu{0}/cpufreq/{1}".format(
             core_num, name)
         output = self.d_a_con("cat %s" % freq_path)
@@ -924,6 +924,7 @@  class TestVmPwMgmtPolicy(TestCase):
         """
         Run after each test case.
         """
+        self.dut.send_expect('systemctl restart chronyd', '# ')
         self.vm_dut.kill_all()
         self.dut.kill_all()