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 5DAF2A0352; Thu, 16 Jan 2020 03:30:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 552351C10F; Thu, 16 Jan 2020 03:30:17 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 56F251BFC4 for ; Thu, 16 Jan 2020 03:30:15 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 18:30:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,324,1574150400"; d="scan'208";a="273842588" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 15 Jan 2020 18:30:14 -0800 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Jan 2020 18:28:55 -0800 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 16 Jan 2020 10:28:54 +0800 Received: from shsmsx602.ccr.corp.intel.com ([10.109.6.142]) by SHSMSX602.ccr.corp.intel.com ([10.109.6.142]) with mapi id 15.01.1713.004; Thu, 16 Jan 2020 10:28:54 +0800 From: "Yao, Lei A" To: "Mo, YufengX" , "dts@dpdk.org" Thread-Topic: [dts][PATCH V2 4/4] test_plans/power_bidirection_channel: upload test plan Thread-Index: AQHVzA/YDEClou92eEiYwZAbsyAl36fskS2A Date: Thu, 16 Jan 2020 02:28:54 +0000 Message-ID: <4f05910806114b04afb1750b1f9f22e2@intel.com> References: <20200116015630.21250-1-yufengx.mo@intel.com> <20200116015630.21250-5-yufengx.mo@intel.com> In-Reply-To: <20200116015630.21250-5-yufengx.mo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2 4/4] test_plans/power_bidirection_channel: 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: Thursday, January 16, 2020 9:57 AM > To: dts@dpdk.org; Yao, Lei A > Cc: Mo, YufengX > Subject: [dts][PATCH V2 4/4] test_plans/power_bidirection_channel: upload > test plan >=20 >=20 > upload test plan. >=20 > Signed-off-by: yufengmx Acked-by: Lei Yao > --- > .../power_bidirection_channel_test_plan.rst | 173 ++++++++++++++++++ > 1 file changed, 173 insertions(+) > create mode 100644 test_plans/power_bidirection_channel_test_plan.rst >=20 > diff --git a/test_plans/power_bidirection_channel_test_plan.rst > b/test_plans/power_bidirection_channel_test_plan.rst > new file mode 100644 > index 0000000..e26a603 > --- /dev/null > +++ b/test_plans/power_bidirection_channel_test_plan.rst > @@ -0,0 +1,173 @@ > +.. Copyright (c) <2010-2020>, 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 > +power bidirection channel test plan > +=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 > + > +preparation work > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Turn on speedstep option in BIOS. > +2. Turn on CPU C3 and C6. > +3. Turn on turbo in BIOS. > +4. Disable intel_pstate in Linux kernel command ``intel_pstate=3Ddisable= ``. > +5. modprobe msr module to let the application can get the CPU HW info. > +6. Let user space can control the CPU frequency:: > + > + cpupower frequency-set -g userspace > + > +7. set a folder:: > + > + mkdir /tmp/powermonitor > + chmod 777 /tmp/powermonitor > + > + > +Test Case 1 : Check VM can send power policy command to host and get > +acked > +=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=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 > +Step 1. Launch VM using libvirt:: > + > + virsh start [VM name] > + > +Step 2. Launch VM power manager example on the host to monitor the > channel from VM:: > + > + ./examples/vm_power_manager/build/vm_power_mgr -l 12-14 -n 4 -- > no-pci > + vmpower> add_vm [vm name] > + vmpower> add_channels [vm name] all > + vmpower> set_channel_status [vm name] all enabled > + vmpower> show_vm [vm name] > + > + If VM name is ubuntu, the command as following: > + vmpower> add_vm ubuntu > + vmpower> add_channels ubuntu all > + vmpower> set_channel_status ubuntu all enabled > + vmpower> show_vm ubuntu > + > +Step 3. In the VM, launch guest_vm_power_mgr to set and send the power > manager policy to the host power example:: > + > + ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr > -c > + 0xff -n 4 -m 1024 --no-pci --file-prefix=3Dvm_power -- --vm-name=3Dubun= tu > + --vcpu-list=3D0-7 > + > + Send command to the core 7 on host APP: > + vmpower(guest)> set_cpu_freq 7 down > + > + Check following info will be returned for the ACK activity, as follo= wing: > + ACK received for message sent to host. > + > + If command can't be executed, NACK will be returned, as following: > + NACK received for message sent to host. > + > +Step 4. Set frequency on core which is out of the VM's core scope:: > + > + For example, the vcpu range is 0-7, we set command to vcpu number 9 = as > following: > + vmpower(guest)> set_cpu_freq 9 down > + GUEST_CHANNEL: Channel is not connected > + Error sending message: Unknown error -1 > + > + > +Test Case 2 : Query Host CPU frequency list from VM > +=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=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > +Step 1. Launch VM using libvirt:: > + > + virsh start [VM name] > + > +Step 2. Launch VM power manager example on the host to monitor the > channel from VM:: > + > + ./examples/vm_power_manager/build/vm_power_mgr -l 12-14 -n 4 -- > no-pci > + vmpower> add_vm [vm name] > + vmpower> add_channels [vm name] all > + vmpower> set_channel_status [vm name] all enabled > + vmpower> show_vm [vm name] > + vmpower> set_query > + > +Step 3. Enable the query permission for target VM from host > vm_power_mgr example:: > + > + Command format: set_query > + if vm name is ubuntu,command as following: > + vmpower> set_query ubuntu enable > + > +Step 4. Query the CPU frequency for all CPU cores from VM side:: > + > + ./examples/vm_power_manager/guest_cli/build/guest_vm_power_mgr > -c 0xff -n 4 -m 1024 --no-pci --file-prefix=3Dvm_power -- --vm-name=3Dubu= ntu -- > vcpu-list=3D0-7 > + vmpower> query_cpu_freq | all > + > + Check vcpu 0~7 frequency info will be returned, for example: > + Frequency of [0] vcore is 2300000. > + Frequency of [1] vcore is 2200000. > + Frequency of [2] vcore is 2800000. > + Frequency of [3] vcore is 2300000. > + Frequency of [4] vcore is 2300000. > + Frequency of [5] vcore is 2300000. > + Frequency of [6] vcore is 2300000. > + Frequency of [7] vcore is 2300000. > + > +Step 5. Disable query permission from VM, check the host CPU frequency > won't be returned:: > + > + at host side, disable query permission by vm_power_mgr example: > + vmpower> set_query ubuntu disable > + > + at VM side, query CPU frequency again, this action should not be > executed successfully, log as following: > + vmpower(guest)> query_cpu_freq all > + GUEST_CLI: Error receiving message. > + Error during frequency list reception. > + > + > +Test Case 3: Query CPU capability from VM > +=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=3D > +Step1~3. The same as test case 2 > + > +Step4: Query all the valid CPU core capability of host, check all cores' > information is returned. Check the high priority core is recognized corre= ctly:: > + > + For example, core 2 is returned as high priority core: > + vmpower(guest)> query_cpu_caps all > + Capabilities of [0] vcore are: turbo possibility: 1, is priority cor= e: 0. > + Capabilities of [1] vcore are: turbo possibility: 1, is priority cor= e: 0. > + Capabilities of [2] vcore are: turbo possibility: 1, is priority cor= e: 1. > + Capabilities of [3] vcore are: turbo possibility: 1, is priority cor= e: 0. > + Capabilities of [4] vcore are: turbo possibility: 1, is priority cor= e: 0. > + Capabilities of [5] vcore are: turbo possibility: 1, is priority cor= e: 0. > + Capabilities of [6] vcore are: turbo possibility: 1, is priority cor= e: 0. > + Capabilities of [7] vcore are: turbo possibility: 1, is priority cor= e: 0. > + > +Step 5: Query CPU capability for core out of scope, check no CPU info wi= ll be > return:: > + > + For example, the valid vcpu range is 0~7, query cpu capability of co= re 9 > should return error as following: > + vmpower(guest)> query_cpu_caps 9 > + Invalid parameter provided. > + > +Step 6: Disable query permission from VM, check the host CPU capability > won't be returned:: > + > + at host side, disable query permission by vm_power_mgr example: > + vmpower> set_query ubuntu disable > + > + at VM side, query CPU capability again, this action should not be ex= ecuted > successfully, log as following: > + vmpower(guest)> query_cpu_caps all > + GUEST_CLI: Error receiving message. > + Error during capabilities reception. > \ No newline at end of file > -- > 2.21.0