On 04/10/2023 10:34, David Marchand wrote:
Hello Kevin,
On Fri, Sep 29, 2023 at 2:50 PM Kevin Traynor <[email protected]> wrote:
Extend 'pmd-sleep-max' so that individual PMD thread cores
may have a specified max sleep request value.
Existing behaviour is maintained.
Any PMD thread core without a value will use the global value
if set or default no sleep.
To set PMD thread cores 8 and 9 to never request a load based sleep
and all other PMD thread cores to be able to request a max sleep of
50 usecs:
$ ovs-vsctl set open_vswitch . other_config:pmd-sleep-max=50,8:0,9:0
To set PMD thread cores 10 and 11 to request a max sleep of 100 usecs
and all other PMD thread cores to never request a sleep:
$ ovs-vsctl set open_vswitch . other_config:pmd-sleep-max=10:100,11:100
'pmd-sleep-show' is updated to show the max sleep value for each PMD thread.
Signed-off-by: Kevin Traynor <[email protected]>
It is a bit hard to follow the differences with the v3 patches which I
had reviewed previously.
oop, I should have included a list of items updated but it slipped my mind.
I understand the main differences was on naming / cosmetics changes
requested by Ilya, and updating vswitch.xml.
Yes, mainly rework on items suggested by Ilya.
Notable changes from v3:
- changed code to write max sleep time directly into pmd even if it is
using the datapath default, this avoids 2 levels of lookup in
pmd_thread_main.
- changed code to also handle deprecated pmd-maxsleep. As before the new
config takes precedence. As part of the other patches in v3 I had just
removed pmd-maxsleep but v4 patches deprecated it.
- updated logging to make it more consistent with other messages on pmd
thread start
- updated logging to a more pmd-rxq-show style for pmd-sleep-show
- Updated vswitch.xml
In any case, this patch still lgtm, with just a comment on vswitch.xml.
Reviewed-by: David Marchand <[email protected]>
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index cfcde34ff..8dab1cd6e 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -803,7 +803,5 @@
</p>
</column>
- <column name="other_config" key="pmd-sleep-max"
- type='{"type": "integer",
- "minInteger": 0, "maxInteger": 10000}'>
+ <column name="other_config" key="pmd-sleep-max">
<p>
Specifies the maximum sleep time that will be requested in
@@ -824,4 +822,32 @@
The maximum value is <code>10000 microseconds</code>.
</p>
+ <p>
+ <code>other_config:pmd-sleep-max=<
+ pmd-sleep-list></code>
Do we need a newline here?
This renders as:
other_config:pmd-sleep-max=< pmd-sleep-list>
I did not notice in the past when reviewing the shared mempool series,
but I see the same pattern with other_config:shared-mempool-config=<
user-shared-mempool-mtu-list>.
So maybe it is an accepted form, but it seems strange to me.
You're right, it looks a bit odd. I copied what I had done previously.
I'll fix when sending a new version.
Thanks for catching it.
+ </p>
+ <p>where</p>
+ <p>
+ <ul>
+ <li>
+ <pmd-sleep-list> ::= NULL | <non-empty-list>
+ </li>
+ <li>
+ <non-empty-list> ::= <pmd-sleep-value> |
+ <pmd-sleep-value> ,
+ <non-empty-list>
+ </li>
+ <li>
+ <pmd-sleep-value> ::= <global-default-sleep-value> |
+ <pmd-core-sleep-pair>
+ </li>
+ <li>
+ <global-default-sleep-value> ::= <max-sleep-time>
+ </li>
+ <li>
+ <pmd-core-sleep-pair> ::= <core> :
+ <max-sleep-time>
+ </li>
+ </ul>
+ </p>
</column>
<column name="other_config" key="userspace-tso-enable"
--
2.41.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev