From: David Hunt <david.hunt@intel.com>
To: dev@dpdk.org
Cc: david.hunt@intel.com
Subject: [PATCH v3 7/9] examples/vm_power: add branch ratio policy type
Date: Tue, 26 Jun 2018 10:23:15 +0100 [thread overview]
Message-ID: <20180626092317.11031-8-david.hunt@intel.com> (raw)
In-Reply-To: <20180626092317.11031-1-david.hunt@intel.com>
Add the capability for the vm_power_manager to receive
a policy of type BRANCH_RATIO. This will add any vcpus
in the policy to the oob monitoring thread.
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
examples/vm_power_manager/channel_monitor.c | 23 +++++++++++++++++++--
lib/librte_power/channel_commands.h | 3 ++-
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 73bddd993..7fa47ba97 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -27,6 +27,7 @@
#include "channel_commands.h"
#include "channel_manager.h"
#include "power_manager.h"
+#include "oob_monitor.h"
#define RTE_LOGTYPE_CHANNEL_MONITOR RTE_LOGTYPE_USER1
@@ -92,6 +93,10 @@ get_pcpu_to_control(struct policy *pol)
struct vm_info info;
int pcpu, count;
uint64_t mask_u64b;
+ struct core_info *ci;
+ int ret;
+
+ ci = get_core_info();
RTE_LOG(INFO, CHANNEL_MONITOR, "Looking for pcpu for %s\n",
pol->pkt.vm_name);
@@ -100,8 +105,22 @@ get_pcpu_to_control(struct policy *pol)
for (count = 0; count < pol->pkt.num_vcpu; count++) {
mask_u64b = info.pcpu_mask[pol->pkt.vcpu_to_control[count]];
for (pcpu = 0; mask_u64b; mask_u64b &= ~(1ULL << pcpu++)) {
- if ((mask_u64b >> pcpu) & 1)
- pol->core_share[count].pcpu = pcpu;
+ if ((mask_u64b >> pcpu) & 1) {
+ if (pol->pkt.policy_to_use == BRANCH_RATIO) {
+ ci->cd[pcpu].oob_enabled = 1;
+ ret = add_core_to_monitor(pcpu);
+ if (ret == 0)
+ printf("Monitoring pcpu %d via Branch Ratio\n",
+ pcpu);
+ else
+ printf("Failed to start OOB Monitoring pcpu %d\n",
+ pcpu);
+
+ } else {
+ pol->core_share[count].pcpu = pcpu;
+ printf("Monitoring pcpu %d\n", pcpu);
+ }
+ }
}
}
}
diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/channel_commands.h
index 5e8b4ab5d..ee638eefa 100644
--- a/lib/librte_power/channel_commands.h
+++ b/lib/librte_power/channel_commands.h
@@ -48,7 +48,8 @@ enum workload {HIGH, MEDIUM, LOW};
enum policy_to_use {
TRAFFIC,
TIME,
- WORKLOAD
+ WORKLOAD,
+ BRANCH_RATIO
};
struct traffic {
--
2.17.1
next prev parent reply other threads:[~2018-06-26 9:23 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-07 7:36 [PATCH v1 0/6] examples/vm_power: 100% Busy Polling David Hunt
2018-06-07 7:37 ` [PATCH v1 1/6] examples/vm_power: add check for port count David Hunt
2018-06-21 13:24 ` [PATCH v2 0/8] examples/vm_power: 100% Busy Polling David Hunt
2018-06-21 13:24 ` [PATCH v2 1/8] examples/vm_power: add check for port count David Hunt
2018-06-26 9:23 ` [0/9] examples/vm_power: 100% Busy Polling David Hunt
2018-06-26 9:23 ` [PATCH v3 1/9] examples/vm_power: add check for port count David Hunt
2018-07-13 14:22 ` [PATCH v4 0/9] examples/vm_power: 100% Busy Polling David Hunt
2018-07-13 14:22 ` [PATCH v4 1/9] examples/vm_power: add check for port count David Hunt
2018-07-13 14:22 ` [PATCH v4 2/9] examples/vm_power: add core list parameter David Hunt
2018-07-13 14:22 ` [PATCH v4 3/9] examples/vm_power: add oob monitoring functions David Hunt
2018-07-13 14:22 ` [PATCH v4 4/9] examples/vm_power: allow greater than 64 cores David Hunt
2018-07-13 14:22 ` [PATCH v4 5/9] examples/vm_power: add thread for oob core monitor David Hunt
2018-07-13 14:22 ` [PATCH v4 6/9] examples/vm_power: add port-list to command line David Hunt
2018-07-13 14:23 ` [PATCH v4 7/9] examples/vm_power: add branch ratio policy type David Hunt
2018-07-13 14:23 ` [PATCH v4 8/9] examples/vm_power: add cli args to guest app David Hunt
2018-07-13 14:23 ` [PATCH v4 9/9] examples/vm_power: make branch ratio configurable David Hunt
2018-07-20 22:06 ` [PATCH v4 0/9] examples/vm_power: 100% Busy Polling Thomas Monjalon
2018-06-26 9:23 ` [PATCH v3 2/9] examples/vm_power: add core list parameter David Hunt
2018-06-26 9:23 ` [PATCH v3 3/9] examples/vm_power: add oob monitoring functions David Hunt
2018-07-12 19:13 ` Thomas Monjalon
2018-07-12 22:18 ` Stephen Hemminger
2018-07-13 8:24 ` Hunt, David
2018-06-26 9:23 ` [PATCH v3 4/9] examples/vm_power: allow greater than 64 cores David Hunt
2018-06-26 9:23 ` [PATCH v3 5/9] examples/vm_power: add thread for oob core monitor David Hunt
2018-06-26 9:23 ` [PATCH v3 6/9] examples/vm_power: add port-list to command line David Hunt
2018-06-26 9:23 ` David Hunt [this message]
2018-06-26 9:23 ` [PATCH v3 8/9] examples/vm_power: add cli args to guest app David Hunt
2018-06-26 9:23 ` [PATCH v3 9/9] examples/vm_power: make branch ratio configurable David Hunt
2018-07-12 19:09 ` [0/9] examples/vm_power: 100% Busy Polling Thomas Monjalon
2018-07-13 8:31 ` Hunt, David
2018-07-13 8:33 ` Thomas Monjalon
2018-07-13 8:43 ` Hunt, David
2018-07-18 15:23 ` Thomas Monjalon
2018-06-21 13:24 ` [PATCH v2 2/8] examples/vm_power: add core list parameter David Hunt
2018-06-21 13:24 ` [PATCH v2 3/8] examples/vm_power: add oob monitoring functions David Hunt
2018-06-21 13:24 ` [PATCH v2 4/8] examples/vm_power: allow greater than 64 cores David Hunt
2018-06-21 13:24 ` [PATCH v2 5/8] examples/vm_power: add thread for oob core monitor David Hunt
2018-06-21 13:24 ` [PATCH v2 6/8] examples/vm_power: add port-list to command line David Hunt
2018-06-21 13:24 ` [PATCH v2 7/8] examples/vm_power: add branch ratio policy type David Hunt
2018-06-21 13:24 ` [PATCH v2 8/8] examples/vm_power: add cli args to guest app David Hunt
2018-06-21 14:28 ` [PATCH v2 0/8] examples/vm_power: 100% Busy Polling Radu Nicolau
2018-06-07 7:37 ` [PATCH v1 2/6] examples/vm_power: add core list parameter David Hunt
2018-06-07 7:37 ` [PATCH v1 3/6] examples/vm_power: add oob monitoring functions David Hunt
2018-06-07 7:37 ` [PATCH v1 4/6] examples/vm_power: allow greater than 64 cores David Hunt
2018-06-07 7:37 ` [PATCH v1 5/6] examples/vm_power: add thread for oob core monitor David Hunt
2018-06-07 7:37 ` [PATCH v1 6/6] examples/vm_power: add port-list to command line David Hunt
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=20180626092317.11031-8-david.hunt@intel.com \
--to=david.hunt@intel.com \
--cc=dev@dpdk.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.