power: remove unused poll counter

Following the previous fix, there is nothing using the ppi counter.

We can remove the related ppi_av array in struct priority_worker.
This allows us to also remove num_dequeue_pkts_prev and pc from
struct priority_worker since they are only used in conjunction
with the ppi_av array.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
Jim Harris 2021-11-05 15:53:51 +00:00 committed by David Marchand
parent 0353121c33
commit d4fb4eb087
2 changed files with 0 additions and 14 deletions

View File

@ -72,8 +72,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 +89,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;
@ -216,10 +212,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,7 +225,6 @@ 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];

View File

@ -71,7 +71,6 @@ struct priority_worker {
enum queue_state queue_state;
uint64_t empty_dequeues_prev;
uint64_t num_dequeue_pkts_prev;
/* Used for training only */
struct freq_threshold thresh[NUM_FREQ];
@ -82,10 +81,6 @@ struct priority_worker {
uint64_t edpi_av[BINS_AV];
/* empty poll counter */
uint32_t ec;
/* ppi mean valid poll counter per interval */
uint64_t ppi_av[BINS_AV];
/* valid poll counter */
uint32_t pc;
uint32_t lcore_id;
uint32_t iter_counter;