DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] examples/power: fix busyness number limed to 50%
@ 2019-07-15 14:07 David Hunt
  2019-07-16 13:50 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: David Hunt @ 2019-07-15 14:07 UTC (permalink / raw)
  To: dev; +Cc: david.hunt

Current implementation only outputs 3 numbers for busyness, 0, 50 and 100.
Fix this so that the 50% is replaced by a curve, more meaningful.
This can be replaced in each use case by a suitable calculation for
that use case.

Fixes: 609e79841fcf ("examples/l3fwd-power: add telemetry mode")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 examples/l3fwd-power/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 7a95605c4..cbe8f8e3f 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -184,8 +184,8 @@ enum busy_rate {
  * reference CYCLES to be used to
  * measure core busyness based on poll count
  */
-#define MIN_CYCLES 1500000ULL
-#define MAX_CYCLES 2500000ULL
+#define MIN_CYCLES  1500000ULL
+#define MAX_CYCLES 22000000ULL
 
 /* (500ms) */
 #define TELEMETRY_INTERVALS_PER_SEC 2
@@ -1034,7 +1034,7 @@ main_telemetry_loop(__attribute__((unused)) void *dummy)
 				br = FULL;
 			} else if (diff_tsc > MIN_CYCLES &&
 					diff_tsc < MAX_CYCLES) {
-				br = PARTIAL;
+				br = (diff_tsc * 100) / MAX_CYCLES;
 			} else {
 				br = ZERO;
 			}
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v1] examples/power: fix busyness number limed to 50%
  2019-07-15 14:07 [dpdk-dev] [PATCH v1] examples/power: fix busyness number limed to 50% David Hunt
@ 2019-07-16 13:50 ` Burakov, Anatoly
  2019-07-17 20:49   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2019-07-16 13:50 UTC (permalink / raw)
  To: David Hunt, dev

On 15-Jul-19 3:07 PM, David Hunt wrote:
> Current implementation only outputs 3 numbers for busyness, 0, 50 and 100.
> Fix this so that the 50% is replaced by a curve, more meaningful.
> This can be replaced in each use case by a suitable calculation for
> that use case.
> 
> Fixes: 609e79841fcf ("examples/l3fwd-power: add telemetry mode")
> 
> Signed-off-by: David Hunt <david.hunt@intel.com>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

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

* Re: [dpdk-dev] [PATCH v1] examples/power: fix busyness number limed to 50%
  2019-07-16 13:50 ` Burakov, Anatoly
@ 2019-07-17 20:49   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-07-17 20:49 UTC (permalink / raw)
  To: David Hunt; +Cc: dev, Burakov, Anatoly

16/07/2019 15:50, Burakov, Anatoly:
> On 15-Jul-19 3:07 PM, David Hunt wrote:
> > Current implementation only outputs 3 numbers for busyness, 0, 50 and 100.
> > Fix this so that the 50% is replaced by a curve, more meaningful.
> > This can be replaced in each use case by a suitable calculation for
> > that use case.
> > 
> > Fixes: 609e79841fcf ("examples/l3fwd-power: add telemetry mode")
> > 
> > Signed-off-by: David Hunt <david.hunt@intel.com>
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks



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

end of thread, other threads:[~2019-07-17 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15 14:07 [dpdk-dev] [PATCH v1] examples/power: fix busyness number limed to 50% David Hunt
2019-07-16 13:50 ` Burakov, Anatoly
2019-07-17 20:49   ` Thomas Monjalon

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