gpudev: fix page alignment in communication list
[dpdk.git] / lib / power / rte_power_empty_poll.c
index 975aa92..4a4db51 100644 (file)
@@ -5,8 +5,6 @@
 #include <string.h>
 
 #include <rte_lcore.h>
-#include <rte_cycles.h>
-#include <rte_atomic.h>
 #include <rte_malloc.h>
 #include <inttypes.h>
 
@@ -72,8 +70,6 @@ enter_normal_state(struct priority_worker *poll_stats)
        /* Clear the averages arrays and strs */
        memset(poll_stats->edpi_av, 0, sizeof(poll_stats->edpi_av));
        poll_stats->ec = 0;
-       memset(poll_stats->ppi_av, 0, sizeof(poll_stats->ppi_av));
-       poll_stats->pc = 0;
 
        poll_stats->cur_freq = MED;
        poll_stats->iter_counter = 0;
@@ -91,8 +87,6 @@ enter_busy_state(struct priority_worker *poll_stats)
 {
        memset(poll_stats->edpi_av, 0, sizeof(poll_stats->edpi_av));
        poll_stats->ec = 0;
-       memset(poll_stats->ppi_av, 0, sizeof(poll_stats->ppi_av));
-       poll_stats->pc = 0;
 
        poll_stats->cur_freq = HGH;
        poll_stats->iter_counter = 0;
@@ -207,7 +201,7 @@ update_training_stats(struct priority_worker *poll_stats,
 static __rte_always_inline uint32_t
 update_stats(struct priority_worker *poll_stats)
 {
-       uint64_t tot_edpi = 0, tot_ppi = 0;
+       uint64_t tot_edpi = 0;
        uint32_t j, percent;
 
        struct priority_worker *s = poll_stats;
@@ -216,10 +210,6 @@ update_stats(struct priority_worker *poll_stats)
 
        s->empty_dequeues_prev = s->empty_dequeues;
 
-       uint64_t ppi = s->num_dequeue_pkts - s->num_dequeue_pkts_prev;
-
-       s->num_dequeue_pkts_prev = s->num_dequeue_pkts;
-
        if (s->thresh[s->cur_freq].base_edpi < cur_edpi) {
 
                /* edpi mean empty poll counter difference per interval */
@@ -233,11 +223,9 @@ update_stats(struct priority_worker *poll_stats)
        }
 
        s->edpi_av[s->ec++ % BINS_AV] = cur_edpi;
-       s->ppi_av[s->pc++ % BINS_AV] = ppi;
 
        for (j = 0; j < BINS_AV; j++) {
                tot_edpi += s->edpi_av[j];
-               tot_ppi += s->ppi_av[j];
        }
 
        tot_edpi = tot_edpi / BINS_AV;
@@ -467,8 +455,7 @@ rte_power_empty_poll_stat_free(void)
 
        RTE_LOG(INFO, POWER, "Close the Empty Poll\n");
 
-       if (ep_params != NULL)
-               rte_free(ep_params);
+       rte_free(ep_params);
 }
 
 int