[4/4] tests/TestSuite_vm_pw_mgmt_policy: change core_mask

Message ID 20210407081807.29110-4-reshma.pattan@intel.com (mailing list archive)
State Rejected
Headers
Series [1/4] conf/power_pstate: change core |

Commit Message

Pattan, Reshma April 7, 2021, 8:18 a.m. UTC
  Change the vm_power_manager core mask and guest_vm_power_manager
core mask.

Now with dpdk 20.11 the cores used for guest_cli
should be enabled in vm_power_manager core mask.
Otherwise vm_power_manager will not grant the access to
fetch the information for those cores missing in the coremask.

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

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 test_plans/vm_pw_mgmt_policy_test_plan.rst | 4 ++--
 tests/TestSuite_vm_pw_mgmt_policy.py       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Tu, Lijuan April 8, 2021, 8:55 a.m. UTC | #1
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Reshma Pattan
> Sent: 2021年4月7日 16:18
> To: dts@dpdk.org
> Cc: Pattan, Reshma <reshma.pattan@intel.com>
> Subject: [dts] [PATCH 4/4] tests/TestSuite_vm_pw_mgmt_policy: change
> core_mask
> 
> Change the vm_power_manager core mask and guest_vm_power_manager
> core mask.
> 
> Now with dpdk 20.11 the cores used for guest_cli should be enabled in
> vm_power_manager core mask.
> Otherwise vm_power_manager will not grant the access to fetch the
> information for those cores missing in the coremask.
> 
> Relevant DPDK patch
> https://patchwork.dpdk.org/project/dpdk/patch/20210115125250.22416-1-
> david.hunt@intel.com/
> 
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> ---
>  test_plans/vm_pw_mgmt_policy_test_plan.rst | 4 ++--
>  tests/TestSuite_vm_pw_mgmt_policy.py       | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/test_plans/vm_pw_mgmt_policy_test_plan.rst
> b/test_plans/vm_pw_mgmt_policy_test_plan.rst
> index cfbfe962..98894ff5 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 9abcafd2..ac746180 100644
> --- a/tests/TestSuite_vm_pw_mgmt_policy.py
> +++ b/tests/TestSuite_vm_pw_mgmt_policy.py
> @@ -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': '0xffff',

Some server may not have so many cores, prefer to get_cores_mask("all") if need many cores.

>                  'mem_channel': self.dut.get_memory_channels(), })
>          prompt = 'vmpower>'
>          cmd = [' '.join([self.vm_power_mgr, eal_option]), prompt, 30]
> --
> 2.17.1
  
Pattan, Reshma April 8, 2021, 9:14 a.m. UTC | #2
> -----Original Message-----
> From: Tu, Lijuan <lijuan.tu@intel.com>
> 
> > Cc: Pattan, Reshma <reshma.pattan@intel.com>
> > -                'core_mask': self.get_cores_mask("1S/3C/1T"),
> > +                'core_mask': '0xffff',
> 
> Some server may not have so many cores, prefer to get_cores_mask("all") if
> need many cores.

AFAIK, get_cores_mask("all") will return all cores except the core0. I actually need the core0 too.
Is there any API that I can use which returns core 0 too, if not I might need to have this explicit core mask.
  
Tu, Lijuan April 12, 2021, 5:16 a.m. UTC | #3
> -----Original Message-----
> From: Pattan, Reshma <reshma.pattan@intel.com>
> 
> > -----Original Message-----
> > From: Tu, Lijuan <lijuan.tu@intel.com>
> >
> > > Cc: Pattan, Reshma <reshma.pattan@intel.com>
> > > -                'core_mask': self.get_cores_mask("1S/3C/1T"),
> > > +                'core_mask': '0xffff',
> >
> > Some server may not have so many cores, prefer to
> > get_cores_mask("all") if need many cores.
> 
> AFAIK, get_cores_mask("all") will return all cores except the core0. I actually
> need the core0 too.
> Is there any API that I can use which returns core 0 too, if not I might need to
> have this explicit core mask.

Set bypass_core0=False, then DTS will utilize core 0.
  

Patch

diff --git a/test_plans/vm_pw_mgmt_policy_test_plan.rst b/test_plans/vm_pw_mgmt_policy_test_plan.rst
index cfbfe962..98894ff5 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 9abcafd2..ac746180 100644
--- a/tests/TestSuite_vm_pw_mgmt_policy.py
+++ b/tests/TestSuite_vm_pw_mgmt_policy.py
@@ -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': '0xffff',
                 'mem_channel': self.dut.get_memory_channels(), })
         prompt = 'vmpower>'
         cmd = [' '.join([self.vm_power_mgr, eal_option]), prompt, 30]