Hi Kevin, Here are some comments on the stats side:
On Tue, Nov 29, 2022 at 3:01 PM Kevin Traynor <[email protected]> wrote: > @@ -6964,5 +6999,19 @@ reload: > * There was no time updates on current iteration. */ > pmd_thread_ctx_time_update(pmd); > - tx_packets = dp_netdev_pmd_flush_output_packets(pmd, false); > + tx_packets = dp_netdev_pmd_flush_output_packets(pmd, > + sleep_time ? true : > false); > + } > + > + if (powersave) { > + if (sleep_time) { > + xnanosleep(sleep_time); > + time_slept = sleep_time; - time_slept is the requested time, and not the time that ovs actually slept. PMD_PWR_SLEEP_TIME stat won't be accurate if xnanosleep() takes longer than expected. I would add a "timer" around xnanosleep() and store cycles internally (and then translate back to us in the stats output). - Both pmd idling (PMD_CYCLES_ITER_IDLE) and pmd processing (PMD_CYCLES_ITER_BUSY) stats now include cycles spent sleeping. Those stats are used for animating pmd stats ("avg processing cycles per packet") and rxq stats ("overhead"). I think those "sleeping" cycles should be counted as idle so that "busy" cycles do represent time spent processing the packets. WDYT? > + } > + if (sleep_time < PMD_PWR_MAX_SLEEP) { > + /* Increase potential sleep time for next iteration. */ > + sleep_time += PMD_PWR_INC; > + } else { > + max_sleep_hit = true; > + } > } > -- David Marchand _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
