[dpdk-dev] power: fix power example app response time

Message ID 1508772072-110814-1-git-send-email-david.hunt@intel.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Hunt, David Oct. 23, 2017, 3:21 p.m. UTC
  A delay in the loop waiting for the virtio-serial commands in the
vm_power_manager app was causing a lag in the response time. This was
set to 1 second, and has now been changed to 1ms.

Fixes: f14791a8126e ("examples/vm_power_mgr: add policy to channels")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/channel_monitor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon Oct. 24, 2017, 9:47 p.m. UTC | #1
23/10/2017 17:21, David Hunt:
> A delay in the loop waiting for the virtio-serial commands in the
> vm_power_manager app was causing a lag in the response time. This was
> set to 1 second, and has now been changed to 1ms.
> 
> Fixes: f14791a8126e ("examples/vm_power_mgr: add policy to channels")
> 
> Signed-off-by: David Hunt <david.hunt@intel.com>

Applied, thanks
  

Patch

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index f8e3491..37e71ed 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -64,7 +64,7 @@ 
 uint64_t vsi_pkt_count_prev[384];
 uint64_t rdtsc_prev[384];
 
-double time_period_s = 1;
+double time_period_ms = 1;
 static volatile unsigned run_loop = 1;
 static int global_event_fd;
 static unsigned int policy_is_set;
@@ -542,7 +542,7 @@  run_channel_monitor(void)
 					process_request(&pkt, chan_info);
 			}
 		}
-		rte_delay_us(time_period_s*1000000);
+		rte_delay_us(time_period_ms*1000);
 		if (policy_is_set) {
 			int j;