From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EC95EA04DD; Tue, 24 Dec 2019 02:56:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1DF41C01; Tue, 24 Dec 2019 02:56:19 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 58BC51252 for ; Tue, 24 Dec 2019 02:56:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2019 17:56:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,349,1571727600"; d="scan'208";a="367208243" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 23 Dec 2019 17:56:17 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 17:56:16 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 17:56:16 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.109]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.214]) with mapi id 14.03.0439.000; Tue, 24 Dec 2019 09:56:14 +0800 From: "Yao, Lei A" To: "Mo, YufengX" , "dts@dpdk.org" Thread-Topic: [dts][PATCH V4 3/4] test_plans/vm_pw_mgmt_policy: upload test plan Thread-Index: AQHVufz/35LzMKTXCUCjcdKvGsO+BafIho1A Date: Tue, 24 Dec 2019 01:56:14 +0000 Message-ID: <2DBBFF226F7CF64BAFCA79B681719D9549807D8D@shsmsx102.ccr.corp.intel.com> References: <20191224015628.11931-1-yufengx.mo@intel.com> <20191224015628.11931-4-yufengx.mo@intel.com> In-Reply-To: <20191224015628.11931-4-yufengx.mo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmEwMWIyNTItYTUwNS00NjFlLWJkNTUtMDljZTMyNWE1YzNlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUjJSM2hNaTZXZklETVA3MjNBZnBsUUFQeGNxem1wbFRUaEExOUpGeE9zdVdIS1R2RFdaSzV2QWVpdUJzak9KbCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V4 3/4] test_plans/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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" > -----Original Message----- > From: Mo, YufengX > Sent: Tuesday, December 24, 2019 9:56 AM > To: dts@dpdk.org; Yao, Lei A > Cc: Mo, YufengX > Subject: [dts][PATCH V4 3/4] test_plans/vm_pw_mgmt_policy: upload test > plan >=20 >=20 > 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 movi= ng > away from direct controls to policy controls to avoid latency & jitter pe= nalties. > Also provides the ability to react faster. >=20 > 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. >=20 > VM Agent shall have the ability to send the following policy to host. > - traffic policy > - time policy >=20 > VM Agent shall have the ability to send the following hints to host:: > - core disable turbo > - core enable turbo >=20 > Signed-off-by: yufengmx Acked-by: Lei Yao > --- > test_plans/vm_pw_mgmt_policy_test_plan.rst | 335 > +++++++++++++++++++++ > 1 file changed, 335 insertions(+) > create mode 100644 test_plans/vm_pw_mgmt_policy_test_plan.rst >=20 > 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..cfbfe96 > --- /dev/null > +++ b/test_plans/vm_pw_mgmt_policy_test_plan.rst > @@ -0,0 +1,335 @@ > +.. Copyright (c) <2010-2019>, 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. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +VM Power Management Tests (Policy/Turbo) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Inband Policy Control > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +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 penalties. 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 > +- time policy > + > +turbo > +=3D=3D=3D=3D=3D > +A new feature extend the library to enable 'per-core' turbo among other > APIs. > + > +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 as below:: > + > + ``/dev/cpu/%d/msr`` > + > +DPDK technical document refer to:: > + > + ``doc/guides/prog_guide/power_man.rst`` > + ``doc/guides/sample_app_ug/vm_power_management.rst`` > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +#. Hardware:: > + > + - NIC: i40e series('Ethernet Controller X710 for 10GbE SFP+ 1572') > + > +#. BIOS:: > + > + - Enable VT-d and VT-x > + - Enable Enhanced Intel SpeedStep(R) Tech > + - Enable Intel(R) Turbo Boost Technology > + > +#. OS and Kernel:: > + > + - Fedora 30 > + vim /boot/grub2/grubenv > + - Enable Kernel features IOMMU > + iommu=3Dpt > + - Enable Intel IOMMU > + intel_iommu=3Don > + - Disable intel_pstate > + intel_pstate=3Ddisable > + > +#. Virtualization:: > + > + - QEMU emulator version >=3D 2.3.1 > + - libvirtd (libvirt) >=3D 1.2.13.2 > + libvirt configuration refer to > + dpdk/doc/guides/howto/pvp_reference_benchmark.rst ``Libvirt way`` > + chapter > + > +#. port topology diagram:: > + > + packet generator DUT > + .-----------. .-----------. > + | .-------. | | .-------. | > + | | portA | | <------------------> | | port0 | | > + | | portB | | <------------------> | | port1 | | > + | '-------' | | '-------' | > + | | | nic | > + '-----------' '-----------' > + > + > +Set up testing environment > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > +#. Configure VM XML to pin VCPUs/CPUs. > + > + .. code-block:: xml > + > + 8 > + > + > + > + > + > + > + > + > + > + > + > +#. Configure VM XML to set up virtio serial ports. > + > + Create temporary folder for vm_power socket. > + > + mkdir /tmp/powermonitor > + chmod 777 /tmp/powermonitor > + > + Setup one serial port for every one vcpu in VM. > + > + .. code-block:: xml > + > + > + path=3D'/tmp/powermonitor/.'/> > + name=3D'virtio.serial.port.poweragent.'/> > +
> + > + > +#. Create vf and passthrough it to VM. > + > + Create vf on one pf with system driver. > + > + echo 1 > /sys/bus/pci/devices/0000:d8:00.0/sriov_numvfs > + > + .. code-block:: xml > + > + > + > + > +
slot=3D"0x02"/> > + > +
type=3D"pci"/> > + > + > +#. Bind the vf passthrough on VM to igb_uio, bind pf on host to default > system driver. > + > + ./usertools/dpdk-devbind.py --force --bind=3Digb_uio 0000:00:07.0 > + > +#. Compile and run power-manager in host, core number should >=3D 3, add > vm in host. > + > + export RTE_SDK=3D`pwd` > + export RTE_TARGET=3Dx86_64-native-linuxapp-gcc > + make -C examples/vm_power_manager > + > + ./examples/vm_power_manager/build/vm_power_mgr -c 0x7 -n 4 > + > + vmpower> add_vm > + vmpower> add_channels all > + vmpower> set_channel_status all enabled > + > +#. Run testpmd on vm0 when do traffic policy testing, other test cases > ignore > + this step. > + > + ./testpmd -c 0x3 -n 1 -v -m 1024 --file-prefix=3Dvmpower1 -- -i > + --port-topology=3Dloop > + > + testpmd> set fwd mac > + testpmd> set promisc all on > + testpmd> port start all > + testpmd> start > + > +#. Compile and run guest_vm_power_mgr on VM. > + > + export RTE_SDK=3D`pwd` > + export RTE_TARGET=3Dx86_64-native-linuxapp-gcc > + 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=3Dvmpower2 -- -i --vm-name=3D \ > + --policy=3D --vcpu-list=3D --busy-hours=3D + stage> > + > + options description:: > + > + -n or --vm-name > + sets the name of the vm to be used by the host OS. > + -b or --busy-hours > + sets the list of hours that are predicted to be busy > + -q or --quiet-hours > + sets the list of hours that are predicted to be quiet > + -l or --vcpu-list > + sets the list of vcpus to monitor > + -o or --policy > + sets the default policy type > + ``TIME`` > + ``WORKLOAD`` > + > + The format of the hours or list paramers is a comma-separated > + list of integers, which can take the form of > + a. x e.g. --vcpu-list=3D1 > + b. x,y e.g. --quiet-hours=3D3,4 > + c. x-y e.g. --busy-hours=3D9-12 > + d. combination of above (e.g. --busy-hours=3D4,5-7,9) > + > + > +Test Case : time policy > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +check these content. > +#. when dut clock is set to a desired busy hours, put core to max freq. > +#. when dut clock is set to a desired quiet hours, put core to min freq. > + > +This case test multiple guest_vm_power_mgr options, they are composited > +by these content as below:: > + > + #. --policy > + TIME > + #. --vm-name > + vm0 > + #. --vcpu-list > + 0 > + 0,1,2,3,4,5,6,7 > + #. --busy-hours or --quiet-hours > + 23 > + 0-23 > + 4,5-7,23 > + > +example:: > + > + --vm-name=3Dvm0 --policy=3DTIME --vcpu-list=3D0,1,2,3,4,5,6,7 > + --busy-hours=3D0-23,5-7,23 > + > +steps: > + > +#. set DUT system time to desired time. > + > +#. set up testing environment refer to ``Set up testing environment`` st= eps. > + > +#. trigger policy on vm DUT from guest_vm_power_mgr console:: > + > + vmpower(guest)> send_policy now > + > +#. check DUT platform cores frequency, which are in vcpu-list. > + > + > +Test Case : traffic policy > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > +check these content. > +#. use packet generator to send a stream with a pps rate bigger > +2000000, vcpu frequency will run at max frequency. > +#. use packet generator to send a stream with a pps rate between > +1800000 and 2000000, vcpus frequency will run at med frequency. > +#. use packet generator to send a stream with a pps rate less than > +1800000, vcpu frequency will run at min frequency. > + > +This case test multiple guest_vm_power_mgr options, they are composited > +by these content as below:: > + > + #. --policy > + TRAFFIC > + #. --vm-name > + vm0 > + #. --vcpu-list > + 0 > + 0,1,2,3,4,5,6,7 > + > +example:: > + > + --vm-name=3Dvm0 --policy=3DTRAFFIC --vcpu-list=3D0,1,2,3,4,5,6,7 > + > +steps: > + > +#. set up testing environment refer to ``Set up testing environment`` st= eps. > + > +#. trigger policy on vm DUT from guest_vm_power_mgr console:: > + > + vmpower(guest)> send_policy now > + > +#. configure stream in traffic generator, set traffic generator line rat= e > + to desired pps and send packet continuously. > + > +#. check DUT platform cores frequency, which are in vcpu-list. > + > + > +Test Case : disable CPU turbo > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > +check a custom cpu turbo status can be disable. > + > +steps: > + > +#. set up testing environment refer to ``Set up testing environment`` st= eps. > + > +#. set cpu turbo disable on vm DUT from guest_vm_power_mgr console:: > + > + vmpower(guest)> set_cpu_freq disable_turbo > + > +#. verify the DUT physical CPU's turbo has been disable correctly, core > frequency > + should be secondary max value in scaling_available_frequencies:: > + > + cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq > + cat > + /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies > + > +Test Case : enable CPU turbo > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > +check a custom cpu turbo status can be enable. > + > +steps: > + > +#. set up testing environment refer to ``Set up testing environment`` st= eps. > + > +#. set cpu turbo enable on vm DUT from guest_vm_power_mgr console:: > + > + vmpower(guest)> set_cpu_freq enable_turbo > + > +#. Verify the DUT physical CPU's turbo has been enable correctly, core > frequency > + should be max value in scaling_available_frequencies:: > + > + cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq > + cat > + /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies > -- > 2.21.0