test suite reviews and discussions
 help / color / mirror / Atom feed
From: yufengx.mo@intel.com
To: dts@dpdk.org
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V1 1/3] vm_pw_mgmt_policy: upload test plan
Date: Wed,  6 Jun 2018 13:35:32 +0800	[thread overview]
Message-ID: <1528263334-23878-2-git-send-email-yufengx.mo@intel.com> (raw)
In-Reply-To: <1528263334-23878-1-git-send-email-yufengx.mo@intel.com>

From: yufengmx <yufengx.mo@intel.com>


This test plan is for vm power mgmt policy feature.

The DPDK Power Management feature allows users space applications to save power
by dynamically adjusting CPU frequency or entering into different C-States.

*   Adjusting the CPU frequency dynamically according to the utilization of RX
    queue.

*   Entering into different deeper C-States according to the adaptive algorithms
    to speculate brief periods of time suspending the application if no packets
    are received.

This feauture are realized through example/vm_power_manager

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 test_plans/vm_pw_mgmt_policy_test_plan.rst | 266 +++++++++++++++++++++++++++++
 1 file changed, 266 insertions(+)
 create mode 100644 test_plans/vm_pw_mgmt_policy_test_plan.rst

diff --git a/test_plans/vm_pw_mgmt_policy_test_plan.rst b/test_plans/vm_pw_mgmt_policy_test_plan.rst
new file mode 100644
index 0000000..627aad1
--- /dev/null
+++ b/test_plans/vm_pw_mgmt_policy_test_plan.rst
@@ -0,0 +1,266 @@
+.. Copyright (c) <2010-2018>, Intel Corporation
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+========================================
+VM Power Management Tests (Policy/Turbo)
+========================================
+
+Inband Policy Control
+=====================
+
+a feature allows workload to deliver policy to the host to manage Power controls 
+such as p-states Extends the thinking of the current scheme moving away 
+from  direct controls to policy controls to avoid latency & jitter 
+penalities. Also provides the ability to react faster. 
+
+VM Power Manager would use a hint based mechanism by which a VM can
+communicate to a host based governor about its current processing
+requirements. By mapping VMs virtual CPUs to physical CPUs the Power Manager
+can then make decisions according to some policy as to what power state the
+physical CPUs can transition to.
+
+VM Agent shall have the ability to send the following policy to host:
+- traffic policy
+- timer policy
+- workload policy(no expose to user to run)
+
+turbo
+=====
+a new feature extend the library to enable 'per-core' turbo among other APIs.
+
+VM Power Manager would use a hint based mechanism by which a VM can
+communicate to a host based governor about its current processing
+requirements. By mapping VMs virtual CPUs to physical CPUs the Power Manager
+can then make decisions according to some policy as to what power state the
+physical CPUs can transition to.
+
+VM Agent shall have the ability to send the following hints to host:
+- core disable turbo
+- core enable turbo
+
+The power manager will manage the file handles for each core(<n>) below:
+
+- ``/dev/cpu/%d/msr``
+
+note: DPDK technical document refer to ``doc/guides/prog_guide/power_man.rst``
+
+Prerequisites
+=============
+*. Hardware:
+
+    - Platform: SuperMicro 1U Xeon D Broadwell SoC uServer
+    - NIC: i40e series('Ethernet Controller X710 for 10GbE SFP+ 1572')
+    - Per-core turbo is supported only on recent atchitectures. 
+        Haswell, Broadwell, Skylake, etc
+
+*. BIOS:
+
+    - Disable Intel(R) Hyper-Threading Tech
+    - Enable VT-d and VT-x
+    - Enable Enhanced Intel SpeedStep(R) Tech
+    - Enable Intel(R) Turbo Boost Technology
+    - Enable Processor C3
+    - Enable Processor C6
+
+*. OS and Kernel:
+
+    - Fedora 22
+    - Enable Kernel features Huge page, UIO, IOMMU, KVM
+
+    /boot/grub2/grub.cfg
+    - Enable Kernel features IOMMU
+        iommu=pt
+    - Enable Intel IOMMU
+        intel_iommu=on 
+    - Disable intel_pstate 
+        intel_pstate=disable
+
+*. Virtualization:
+
+    - QEMU emulator version >= 2.3.1
+    - libvirtd (libvirt) >= 1.2.13.2
+      libvirt configuration refer to 
+        dpdk/doc/guides/howto/pvp_reference_benchmark.rst ``Libvirt way`` chapter
+    - Add virio-serial port
+
+*. IXIA Traffic Generator Configuration LPM table used for packet routing is:
+
+        +---------+------------------------+----+
+        | Entry # | LPM prefix (IP/length) |    |
+        +---------+------------------------+----+
+        | 0       | 1.1.1.0/24             | P0 |
+        +---------+------------------------+----+
+        | 1       | 2.1.1.0/24             | P1 |
+        +---------+------------------------+----+
+
+
+    The flows should be configured and started by the traffic generator.
+
+        +------+---------+------------+---------+------+-------+--------+
+        | Flow | Traffic | IPv4       | IPv4    | Port | Port  | L4     |
+        |      | Gen.    | Src.       | Dst.    | Src. | Dest. | Proto. |
+        |      | Port    | Address    | Address |      |       |        |
+        +------+---------+------------+---------+------+-------+--------+
+        | 1    | TG0     | 0.0.0.0    | 2.1.1.0 | any  | any   | UDP    |
+        +------+---------+------------+---------+------+-------+--------+
+        | 2    | TG1     | 0.0.0.0    | 1.1.1.0 | any  | any   | UDP    |
+        +------+---------+------------+---------+------+-------+--------+
+
+
+Boot up vm using libvirt
+========================
+*. Configure VM XML to pin VCPUs/CPUs:
+
+   .. code-block:: xml
+
+        <vcpu placement='static'>5</vcpu>
+          <cputune>
+          <vcpupin vcpu='0' cpuset='1'/>
+          <vcpupin vcpu='1' cpuset='2'/>
+          <vcpupin vcpu='2' cpuset='3'/>
+          <vcpupin vcpu='3' cpuset='4'/>
+          <vcpupin vcpu='4' cpuset='5'/>
+        </cputune>
+
+*. Configure VM XML to set up virtio serial ports
+
+    Create temporary folder for vm_power socket.
+
+        mkdir /tmp/powermonitor
+
+    Setup one serial port for every one vcpu in VM.
+
+    .. code-block:: xml
+
+        <channel type='unix'>
+        <source mode='bind' path='/tmp/powermonitor/<vm_name>.<channel_num>'/>
+        <target type='virtio' name='virtio.serial.port.poweragent.<channel_num>'/>
+        <address type='virtio-serial' controller='0' bus='0' port='4'/>
+        </channel>
+
+*. Run power-manager in Host:
+        ./build/vm_power_mgr -c 0x3 -n 4
+
+*. Startup VM and run guest_vm_power_mgr:
+        guest_vm_power_mgr -c 0x1f -n 4 -- -i
+
+*. Add vm in host and check vm_power_mgr can get frequency normally:
+        vmpower> add_vm <vm_name>
+        vmpower> add_channels <vm_name> all
+
+
+Test Case : time policy
+=======================
+*. when clock is turn to 03:00 04:00 05:00, put vcore to max freq
+*. when clock is turn to 11:00 12:00 13:00, put vcore to min freq
+
+step:
+*. Connect two physical ports to IXIA
+
+*. set up testing environment refer to ``Boot up vm using libvirt``
+
+*. set DUT system time to desired time
+
+*. activate policy on vm DUT
+    vmpower(guest)> send_policy now
+
+*. Check DUT platform core frequency
+
+Test Case : traffic policy
+==========================
+*. use pkt generator to send a stream with a rate bigger 2000000, 
+   vcpus' frequence will runn at max frequence
+*. use pkt generator to send a stream with a rate between 2000000~1800000, 
+   vcpus' frequence will run at med frequence
+*. use pkt generator to send a stream with a rate less than 1800000, 
+   vcpus' frequence will run at min frequence
+
+steps:
+*. Connect two physical ports to IXIA
+
+*. set up testing environment refer to ``Boot up vm using libvirt``
+
+*. Configure packet flow in IxiaNetwork, set ixia to send desired bit rate stream
+
+*. activate policy on vm DUT
+    vmpower(guest)> send_policy now
+
+*. Check DUT platform core frequency
+
+Test Case : VM disable CPU turbo
+================================
+check a custom cpu turbo status can be disable
+
+steps:
+*. bind two ports
+
+    ./usertools/dpdk-devbind.py --bind=igb_uio <pci address 1> <pci address 2>
+
+*. set up testing environment refer to ``Boot up vm using libvirt``
+
+*. set cpu turbo disable on vm DUT
+
+    vmpower(guest)> set_cpu_freq <core_num> disable_turbo
+
+*. Verify the DUT physical CPU's turbo has been disable correctly, using linux
+   tool ``cpupower`` to query
+
+    cpupower -c <cpu core> frequency-info
+
+    boost state support:
+      Supported: yes
+      Active: no
+
+Test Case : VM enable CPU turbo
+===============================
+check a custom cpu turbo status can be enable
+
+steps:
+*. bind two ports
+
+    ./usertools/dpdk-devbind.py --bind=igb_uio <pci address 1> <pci address 2>
+
+*. set up testing environment refer to ``Boot up vm using libvirt`` steps
+
+*. set cpu turbo disable on vm DUT
+
+    vmpower(guest)> set_cpu_freq <vm_core_num> enable_turbo
+
+*. Verify the DUT physical CPU's turbo has been disable correctly, using linux
+   tool ``cpupower`` to query
+
+    cpupower -c <cpu core> frequency-info
+
+    boost state support:
+      Supported: yes
+      Active: yes
+
-- 
1.9.3

  reply	other threads:[~2018-06-06  5:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06  5:35 [dts] [PATCH V1 0/3] vm_pw_mgmt_policy: upload test plan and automation script yufengx.mo
2018-06-06  5:35 ` yufengx.mo [this message]
2018-06-06  5:35 ` [dts] [PATCH V1 2/3] vm_pw_mgmt_policy: upload " yufengx.mo
2018-06-06  5:35 ` [dts] [PATCH V1 3/3] vm_pw_mgmt_policy: framework etgen/ixia yufengx.mo

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=1528263334-23878-2-git-send-email-yufengx.mo@intel.com \
    --to=yufengx.mo@intel.com \
    --cc=dts@dpdk.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).