From: "Yao, Lei A" <lei.a.yao@intel.com>
To: "Mo, YufengX" <yufengx.mo@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V2 4/4] test_plans/power_bidirection_channel: upload test plan
Date: Thu, 16 Jan 2020 02:28:54 +0000 [thread overview]
Message-ID: <4f05910806114b04afb1750b1f9f22e2@intel.com> (raw)
In-Reply-To: <20200116015630.21250-5-yufengx.mo@intel.com>
> -----Original Message-----
> From: Mo, YufengX <yufengx.mo@intel.com>
> Sent: Thursday, January 16, 2020 9:57 AM
> To: dts@dpdk.org; Yao, Lei A <lei.a.yao@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts][PATCH V2 4/4] test_plans/power_bidirection_channel: upload
> test plan
>
>
> upload test plan.
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
> ---
> .../power_bidirection_channel_test_plan.rst | 173 ++++++++++++++++++
> 1 file changed, 173 insertions(+)
> create mode 100644 test_plans/power_bidirection_channel_test_plan.rst
>
> 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.
> +
> +===================================
> +power bidirection channel test plan
> +===================================
> +
> +preparation work
> +================
> +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=disable``.
> +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
> +=========================================================
> ==============
> +===
> +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=vm_power -- --vm-name=ubuntu
> + --vcpu-list=0-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 following:
> + 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
> +===================================================
> +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 <vm_name> <enable|disable>
> +
> +Step 3. Enable the query permission for target VM from host
> vm_power_mgr example::
> +
> + Command format: set_query <vm_name> <enable|disable>
> + 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=vm_power -- --vm-name=ubuntu --
> vcpu-list=0-7
> + vmpower> query_cpu_freq <core_num> | 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
> +=========================================
> +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 correctly::
> +
> + 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 core: 0.
> + Capabilities of [1] vcore are: turbo possibility: 1, is priority core: 0.
> + Capabilities of [2] vcore are: turbo possibility: 1, is priority core: 1.
> + Capabilities of [3] vcore are: turbo possibility: 1, is priority core: 0.
> + Capabilities of [4] vcore are: turbo possibility: 1, is priority core: 0.
> + Capabilities of [5] vcore are: turbo possibility: 1, is priority core: 0.
> + Capabilities of [6] vcore are: turbo possibility: 1, is priority core: 0.
> + Capabilities of [7] vcore are: turbo possibility: 1, is priority core: 0.
> +
> +Step 5: Query CPU capability for core out of scope, check no CPU info will be
> return::
> +
> + For example, the valid vcpu range is 0~7, query cpu capability of core 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 executed
> 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
next prev parent reply other threads:[~2020-01-16 2:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 1:56 [dts] [PATCH V2 0/4] power_bidirection_channel: upload automation script and " yufengmx
2020-01-16 1:56 ` [dts] [PATCH V2 1/4] tests/power_bidirection_channel: vm config file yufengmx
2020-01-16 2:27 ` Yao, Lei A
2020-01-16 1:56 ` [dts] [PATCH V2 2/4] tests/power_bidirection_channel: upload automation script yufengmx
2020-01-16 2:27 ` Yao, Lei A
2020-01-16 1:56 ` [dts] [PATCH V2 3/4] test_plans/power_bidirection_channel: add test plan index yufengmx
2020-01-16 2:28 ` Yao, Lei A
2020-01-16 1:56 ` [dts] [PATCH V2 4/4] test_plans/power_bidirection_channel: upload test plan yufengmx
2020-01-16 2:28 ` Yao, Lei A [this message]
2020-01-16 6:18 ` [dts] [PATCH V2 0/4] power_bidirection_channel: upload automation script and " Tu, Lijuan
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=4f05910806114b04afb1750b1f9f22e2@intel.com \
--to=lei.a.yao@intel.com \
--cc=dts@dpdk.org \
--cc=yufengx.mo@intel.com \
/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).