DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 0/4] add per-core Turbo Boost capability
@ 2017-08-22 16:11 David Hunt
  2017-08-22 16:11 ` [dpdk-dev] [PATCH v1 1/4] lib/librte_power: add per-core turbo capability David Hunt
                   ` (3 more replies)
  0 siblings, 4 replies; 34+ messages in thread
From: David Hunt @ 2017-08-22 16:11 UTC (permalink / raw)
  To: dev; +Cc: david.hunt

Recent generations of the Intel® Xeon® family processors allow Turbo Boost
to be enabled/disabled on a per-core basis.

This patch set introduces additional API calls to the librte_power library
to allow users to enable/disable Turbo Boost on particular cores.

Additionally, the use of the library is demonstrated by additions to the
vm_power_manager example application, where the new commands have been
added to allow the turbo status of cores to be changed dynamically.

Extra message types have been added to the virtio-serial channels between the
guest_vm_power_manager app and the vm_power_manager apps to demonstrate
turbo change requests from a virtual machine. In this case, the guest will
send a request to the physical host, which in turn will change the state of
the turbo status.


Usage Example:
--------------

A VM has been created using 8 CPU cores, and 8 virtio-serial channels have
been created as per-core communications channels between the host and the VM.

See: http://www.dpdk.org/doc/guides/sample_app_ug/vm_power_management.html
for more information on setting up the vm_power applications.

In the vm_power_manager app on the host, we can query these channels:
vmpower> show_vm ubuntu2

VM: 'ubuntu2', status = ACTIVE
Channels 8
  [0]: /tmp/powermonitor/ubuntu2.0, status = CONNECTED
  [1]: /tmp/powermonitor/ubuntu2.1, status = CONNECTED
  [2]: /tmp/powermonitor/ubuntu2.2, status = CONNECTED
  [3]: /tmp/powermonitor/ubuntu2.3, status = CONNECTED
  [4]: /tmp/powermonitor/ubuntu2.4, status = CONNECTED
  [5]: /tmp/powermonitor/ubuntu2.5, status = CONNECTED
  [6]: /tmp/powermonitor/ubuntu2.6, status = CONNECTED
  [7]: /tmp/powermonitor/ubuntu2.7, status = CONNECTED
Virtual CPU(s): 8
  [0]: Physical CPU Mask 0x100000
  [1]: Physical CPU Mask 0x200000
  [2]: Physical CPU Mask 0x400000
  [3]: Physical CPU Mask 0x800000
  [4]: Physical CPU Mask 0x1000000
  [5]: Physical CPU Mask 0x2000000
  [6]: Physical CPU Mask 0x4000000
  [7]: Physical CPU Mask 0x8000000

Once the VM is up and running, if we exercise all the cores on the guest, we
can use turbostat on the host to see the frequencies of the guest cores. In
this example, it's cores 20-27:

      19       0    0.01    2500    2500
      20    2498  100.00    2500    2498
      21    2498  100.00    2500    2498
      22    2498  100.00    2500    2498
      23    2498  100.00    2500    2498
      24   *2498  100.00    2500    2498
      25    2498  100.00    2500    2498
      26    2498  100.00    2500    2498
      27    2498  100.00    2500    2498
      28       0    0.01    2032    2498

We can then issue a command in the vmpower app on the guest:

vmpower(guest)> set_cpu_freq 4 enable_turbo

This command will pass a message down through virtio-serial to the host, which
will enable turbo on core 24, the underlying physical core for the guest's
4th lcore_id. We can then see the change by running turbostat on the host:

      19       0    0.01    2500    2496
      20    2498  100.00    2500    2498
      21    2498  100.00    2500    2498
      22    2498  100.00    2500    2498
      23    2498  100.00    2500    2498
      24   *3297  100.00    3300    2498
      25    2498  100.00    2500    2498
      26    2498  100.00    2500    2498
      27    2498  100.00    2500    2498
      28       0    0.01    1016    2498

Core 24 is now running at 3300MHz, whereas the remainder are still running
at 2500MHz.

We can issue a similar command in the vm_power_manager running on the host
to disable turbo on that core, but this time we use the physical core id:

vmpower> set_cpu_freq 24 disable_turbo

and we see that turbo is now disabled on that core.

      19       0    0.00    2500    2495
      20    2499  100.00    2500    2499
      21    2499  100.00    2500    2499
      22    2499  100.00    2500    2499
      23    2499  100.00    2500    2499
      24   *2499  100.00    2500    2499
      25    2499  100.00    2500    2499
      26    2499  100.00    2500    2499
      27    2499  100.00    2500    2499
      28       0    0.01    1000    2499

[1/4] lib/librte_power: add per-core turbo capability
[2/4] examples/vm_power_manager: add per-core turbo
[3/4] examples/vm_power_cli_guest: add per-core turbo
[4/4] lib: limit turbo to particular models of CPU

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2018-02-06 12:29 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22 16:11 [dpdk-dev] [PATCH v1 0/4] add per-core Turbo Boost capability David Hunt
2017-08-22 16:11 ` [dpdk-dev] [PATCH v1 1/4] lib/librte_power: add per-core turbo capability David Hunt
2017-09-13 10:44   ` [dpdk-dev] [PATCH v2 0/4] add per-core Turbo Boost capability David Hunt
2017-09-13 10:44     ` [dpdk-dev] [PATCH v2 1/4] lib/librte_power: add turbo boost API David Hunt
2017-10-03 14:08       ` [dpdk-dev] [PATCH v3 0/9] Policy Based Power Control for Guest David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 1/9] net/i40e: add API to convert VF MAC to VF id David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 2/9] lib/librte_power: add extra msg type for policies David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 3/9] examples/vm_power_mgr: add vcpu to pcpu mapping David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 4/9] examples/vm_power_mgr: add scale to medium freq fn David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 5/9] examples/vm_power_mgr: add policy to channels David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 6/9] examples/vm_power_mgr: add port initialisation David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 7/9] power: add send channel msg function to map file David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: add send policy to host David Hunt
2017-10-03 14:08         ` [dpdk-dev] [PATCH v3 9/9] examples/vm_power_mgr: set MAC address of VF David Hunt
2017-10-11 16:18       ` [dpdk-dev] [PATCH v9 0/9] Policy Based Power Control for Guest David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 1/9] net/i40e: add API to convert VF MAC to VF id David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 2/9] lib/librte_power: add extra msg type for policies David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 3/9] examples/vm_power_mgr: add vcpu to pcpu mapping David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 4/9] examples/vm_power_mgr: add scale to medium freq fn David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 5/9] examples/vm_power_mgr: add policy to channels David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 6/9] examples/vm_power_mgr: add port initialisation David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 7/9] power: add send channel msg function to map file David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 8/9] examples/guest_cli: add send policy to host David Hunt
2017-10-11 16:18         ` [dpdk-dev] [PATCH v9 9/9] examples/vm_power_mgr: set MAC address of VF David Hunt
2017-10-12  0:23         ` [dpdk-dev] [PATCH v9 0/9] Policy Based Power Control for Guest Ferruh Yigit
2017-09-13 10:44     ` [dpdk-dev] [PATCH v2 2/4] examples/vm_power_manager: add per-core turbo David Hunt
2017-09-13 10:44     ` [dpdk-dev] [PATCH v2 3/4] examples/vm_power_cli_guest: " David Hunt
2017-09-13 10:44     ` [dpdk-dev] [PATCH v2 4/4] doc/power: add information on per-core turbo APIs David Hunt
2017-09-18 18:20       ` Mcnamara, John
2018-02-06 12:29       ` Mcnamara, John
2017-09-22 14:36     ` [dpdk-dev] [PATCH v2 0/4] add per-core Turbo Boost capability Thomas Monjalon
2017-08-22 16:11 ` [dpdk-dev] [PATCH v1 2/4] examples/vm_power_manager: add per-core turbo David Hunt
2017-08-22 16:11 ` [dpdk-dev] [PATCH v1 3/4] examples/vm_power_cli_guest: " David Hunt
2017-08-22 16:11 ` [dpdk-dev] [PATCH v1 4/4] lib: limit turbo to particular models of CPU David Hunt

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).