On 10/01/2023 14:56, David Marchand wrote:
On Tue, Jan 10, 2023 at 2:47 PM Kevin Traynor <[email protected]> wrote:

Sleep for an incremental amount of time if none of the Rx queues
assigned to a PMD have at least half a batch of packets (i.e. 16 pkts)
on an polling iteration of the PMD.

Upon detecting the threshold of >= 16 pkts on an Rxq, reset the
sleep time to zero (i.e. no sleep).

Sleep time will be increased on each iteration where the low load
conditions remain up to a total of the max sleep time which is set
by the user e.g:
ovs-vsctl set Open_vSwitch . other_config:pmd-maxsleep=500

The default pmd-maxsleep value is 0, which means that no sleeps
will occur and the default behaviour is unchanged from previously.

Also add new stats to pmd-perf-show to get visibility of operation
e.g.
...
    - sleep iterations:       153994  ( 76.8 % of iterations)
    Sleep time (us):         9159399  ( 46 us/iteration avg.)
...

Signed-off-by: Kevin Traynor <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>

This v4 updates lgtm.
I just have one nit.

[snip]

+Example output, showing that during the last 10 seconds, 76.8% of iterations
+had a sleep of some length. The total amount of sleep time was 9.15 seconds and
+the average sleep time per iteration was 46 microseconds::
+
+   - sleep iterations:       153994  ( 76.8 % of iterations)
+   Sleep time:               9159399  us ( 46 us/iteration avg.)

This output is not aligned with v4 code.


argh, I even remembered to update the snippet in the commit msg but missed this one :/

I might as well send a v5 with the fix, but I'll wait until tomorrow in case anyone spots anything else in the meantime.


+
+Any potential power saving from PMD load based sleeping is dependent on the
+system configuration (e.g. enabling processor C-states) and workloads.
+

Reviewed-by: David Marchand <[email protected]>



Thanks.

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

Reply via email to