From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D89C6C1EE for ; Wed, 6 Jun 2018 07:35:36 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2018 22:35:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,482,1520924400"; d="scan'208";a="45605659" Received: from shecgisg006.sh.intel.com ([10.239.39.68]) by fmsmga008.fm.intel.com with ESMTP; 05 Jun 2018 22:35:35 -0700 Received: from shecgisg006.sh.intel.com (localhost [127.0.0.1]) by shecgisg006.sh.intel.com with ESMTP id w565ZYpJ024064; Wed, 6 Jun 2018 13:35:34 +0800 Received: (from yufengmx@localhost) by shecgisg006.sh.intel.com with œ id w565ZYaJ024059; Wed, 6 Jun 2018 13:35:34 +0800 From: yufengx.mo@intel.com To: dts@dpdk.org Cc: yufengmx Date: Wed, 6 Jun 2018 13:35:32 +0800 Message-Id: <1528263334-23878-2-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1528263334-23878-1-git-send-email-yufengx.mo@intel.com> References: <1528263334-23878-1-git-send-email-yufengx.mo@intel.com> Subject: [dts] [PATCH V1 1/3] vm_pw_mgmt_policy: upload test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2018 05:35:37 -0000 From: yufengmx 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 --- 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() 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 + + 5 + + + + + + + + +*. 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 + + + + +
+ + +*. 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 + vmpower> add_channels 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 + +*. set up testing environment refer to ``Boot up vm using libvirt`` + +*. set cpu turbo disable on vm DUT + + vmpower(guest)> set_cpu_freq disable_turbo + +*. Verify the DUT physical CPU's turbo has been disable correctly, using linux + tool ``cpupower`` to query + + cpupower -c 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 + +*. set up testing environment refer to ``Boot up vm using libvirt`` steps + +*. set cpu turbo disable on vm DUT + + vmpower(guest)> set_cpu_freq enable_turbo + +*. Verify the DUT physical CPU's turbo has been disable correctly, using linux + tool ``cpupower`` to query + + cpupower -c frequency-info + + boost state support: + Supported: yes + Active: yes + -- 1.9.3