examples/vm_power: add core list parameter
authorDavid Hunt <david.hunt@intel.com>
Fri, 13 Jul 2018 14:22:55 +0000 (15:22 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 20 Jul 2018 20:53:17 +0000 (22:53 +0200)
commit99a968fac0cf1229ff6da9e082f3bd119bb1a746
tree539d1497f0df9261559587589d761412fed248b1
parentace158c4a82199de12dbc4266b08d855d406443c
examples/vm_power: add core list parameter

Add in the '-l' command line parameter (also --core-list)
So the user can now pass --corelist=4,6,8-10 and it will
expand out to 4,6,8,9,10 using the parse function provided
in parse.c (parse_set).

This list of cores is then used to enable out-of-band monitoring
to scale up and down these cores based on the ratio of branch
hits versus branch misses. The ratio will be low when a poll
loop is spinning with no packets being received, so the frequency
will be scaled down.

Also , as part of this change, we introduce a core_info struct
which keeps information on each core in the system, and whether
we're doing out of band monitoring on them.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
examples/vm_power_manager/Makefile
examples/vm_power_manager/main.c
examples/vm_power_manager/parse.c [new file with mode: 0644]
examples/vm_power_manager/parse.h [new file with mode: 0644]
examples/vm_power_manager/power_manager.c
examples/vm_power_manager/power_manager.h