From: "Sexton, Rory" <rory.sexton@intel.com>
To: dev@dpdk.org, david.hunt@intel.com
Cc: "Sexton, Rory" <rory.sexton@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/3] examples/vm_power_manager: Allowing power managing of idle cores
Date: Mon, 18 May 2020 11:39:01 +0100 [thread overview]
Message-ID: <20200518103902.27927-2-rory.sexton@intel.com> (raw)
In-Reply-To: <20200518103902.27927-1-rory.sexton@intel.com>
This change is required to allow the branch ratio algorithm to
power manage cores with no workload running on them. This is
useful both when idle cores don't use C-states and for a number of
hyperthreading scenarios.
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
---
examples/vm_power_manager/oob_monitor_x86.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/vm_power_manager/oob_monitor_x86.c b/examples/vm_power_manager/oob_monitor_x86.c
index 3c514475f..a5b1c168c 100644
--- a/examples/vm_power_manager/oob_monitor_x86.c
+++ b/examples/vm_power_manager/oob_monitor_x86.c
@@ -96,12 +96,12 @@ apply_policy(int core)
g_branch_misses = miss_diff;
if (hits_diff < (INTERVAL*100)) {
- /* Likely no workload running on this core. Skip. */
- return -1.0;
+ /* Likely no workload running on this core. */
+ ratio = 0.0;
+ } else {
+ ratio = (float)miss_diff * (float)100 / (float)hits_diff;
}
- ratio = (float)miss_diff * (float)100 / (float)hits_diff;
-
/*
* Store the last few directions that the ratio indicates
* we should take. If there's on 'up', then we scale up
--
2.17.1
next prev parent reply other threads:[~2020-05-18 11:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 10:39 [dpdk-dev] [PATCH v2 1/3] examples/vm_power_manager: Make branch ratio threshold per core Sexton, Rory
2020-05-18 10:39 ` Sexton, Rory [this message]
2020-06-25 10:17 ` [dpdk-dev] [PATCH v2 2/3] examples/vm_power_manager: Allowing power managing of idle cores Hunt, David
2020-05-18 10:39 ` [dpdk-dev] [PATCH v2 3/3] doc: update vm_power_manager cmdline options in doc Sexton, Rory
2020-06-25 10:21 ` Hunt, David
2020-06-25 10:14 ` [dpdk-dev] [PATCH v2 1/3] examples/vm_power_manager: Make branch ratio threshold per core Hunt, David
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=20200518103902.27927-2-rory.sexton@intel.com \
--to=rory.sexton@intel.com \
--cc=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 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).