Skip to content

examples/vm_power: 100% Busy Polling

David Hunt dpdk-dev 4 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 1 replyApplied
  2. v39 patches 3 repliesSuperseded
  3. v28 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches0 repliesSuperseded

Changes in v4 from the cover letter

* Removed some un-needed header file includes

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/9examples/vm_power: add check for port countexamples/vm_power_manager/main.c+43 -380 replies
2/9examples/vm_power: add core list parameterexamples/vm_power_manager/Makefile examples/vm_power_manager/main.c examples/vm_power_manager/parse.c +3 more+185 -30 replies
3/9examples/vm_power: add oob monitoring functionsexamples/vm_power_manager/Makefile examples/vm_power_manager/oob_monitor.h examples/vm_power_manager/oob_monitor_nop.c +1 more+370 -00 replies
4/9examples/vm_power: allow greater than 64 coresexamples/vm_power_manager/power_manager.c+58 -570 replies
5/9examples/vm_power: add thread for oob core monitorexamples/vm_power_manager/main.c+34 -30 replies
6/9examples/vm_power: add port-list to command lineexamples/vm_power_manager/main.c+1 -00 replies
7/9examples/vm_power: add branch ratio policy typeexamples/vm_power_manager/channel_monitor.c lib/librte_power/channel_commands.h+23 -30 replies
8/9examples/vm_power: add cli args to guest appexamples/vm_power_manager/guest_cli/Makefile examples/vm_power_manager/guest_cli/main.c examples/vm_power_manager/guest_cli/parse.c +3 more+319 -540 replies
9/9examples/vm_power: make branch ratio configurableexamples/vm_power_manager/main.c examples/vm_power_manager/oob_monitor_x86.c examples/vm_power_manager/power_manager.c +1 more+20 -30 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchRadu Nicolau
1/9A-b
2/9A-b
3/9A-b
4/9A-b
5/9A-b
6/9A-b
7/9A-b
8/9A-b
9/9A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/9] examples/vm_power: 100% Busy Polling

This patch set adds the capability to do out-of-band power monitoring on a system. It uses a thread to monitor the branch counters in the targeted cores, and calculates the branch ratio if the running code.

If the branch ratio is low (0.01), then
the code is most likely running in a tight poll loop and doing nothing, i.e. receiving no packets. In this case we scale down the frequency of that core.

If the branch ratio is higher (>0.01), then it is likely that the code is receiving and processing packets. In this case, we scale up the frequency of that core.

The cpu counters are read via /dev/cpu/x/msr, so requires the msr kernel module to be loaded. Because this method is used, the patch set is implemented with one file for x86 systems, and another for non-x86 systems, with conditional compilation in the Makefile. The non-x86 functions are stubs, and do not currently implement any functionality.

The vm_power_manager app has been modified to take a new parameter
--core-list or -l
which takes a list of cores in a comma-separated list format, e.g. 1,3,5-7,9, which resolvest to a core list of 1,3,5,6,7,9 These cores will then be enabled for oob monitoring. When the OOB monitoring thread starts, it reads the branch hits/miss counters of each monitored core, and scales up/down accordingly.

The guest_cli app has also been modified to allow sending of a policy of type BRANCH_RATIO where all of the cores included in the policy will be monitored by the vm_power_manager oob thread.

v2 changes:
* Add the guest_cli patch into this patch set, including the ability to set the policy to BRANCH_RATIO.
http://patches.dpdk.org/patch/40742/
* When vm_power_manger receives a policy with type BRANCH_RATIO, add the relevant cores to the monitoring thread.

v3 changes:
* Added a command line parameter to allow changing of the default branch ratio threshold. can now use -b 0.3 or --branch-ratio=0.3 to set the ratio for scaling up/down.

v4 changes:
* Removed some un-needed header file includes

[1/9] examples/vm_power: add check for port count [2/9] examples/vm_power: add core list parameter [3/9] examples/vm_power: add oob monitoring functions [4/9] examples/vm_power: allow greater than 64 cores [5/9] examples/vm_power: add thread for oob core monitor [6/9] examples/vm_power: add port-list to command line [7/9] examples/vm_power: add branch ratio policy type [8/9] examples/vm_power: add cli args to guest app [9/9] examples/vm_power: make branch ratio configurable