On 09/12/2022 15:13, David Marchand wrote:
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).


Good idea, I added this in v2.


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


As we chatted about, I removed it from both idle and busy stats. It didn't seem to fit well loading all the sleeps into idle as they may have taken place during a busy iteration.

So now it is keeping idle and busy stats meaning the same, whether powersave is true/false. For the sleeps there is a new stat for total time slept and average/iteration. So we can see idle iterations/cycles, busy iterations/cycles and sleep time.

I also removed max sleeps but kept "no-sleep thresh hit".

Let me know if you think it's enough visibility. Thanks for suggestion and review.


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;
+            }
          }




_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to