summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/topics/dpdk/pmd.rst15
-rw-r--r--lib/dpif-netdev.c3
-rw-r--r--tests/pmd.at6
-rw-r--r--vswitchd/vswitch.xml4
4 files changed, 10 insertions, 18 deletions
diff --git a/Documentation/topics/dpdk/pmd.rst b/Documentation/topics/dpdk/pmd.rst
index 0c3bb717f..e70986d16 100644
--- a/Documentation/topics/dpdk/pmd.rst
+++ b/Documentation/topics/dpdk/pmd.rst
@@ -334,10 +334,7 @@ when there is no load or very-low load on all the Rx queues they poll.
This can be enabled by setting the max requested sleep time (in microseconds)
for a PMD thread::
- $ ovs-vsctl set open_vswitch . other_config:pmd-maxsleep=500
-
-Non-zero values will be rounded up to the nearest 10 microseconds to avoid
-requesting very small sleep times.
+ $ ovs-vsctl set open_vswitch . other_config:pmd-maxsleep=50
With a non-zero max value a PMD may request to sleep by an incrementing amount
of time up to the maximum time. If at any point the threshold of at least half
@@ -356,12 +353,12 @@ Sleep time statistics for 10 secs can be seen with::
$ ovs-appctl dpif-netdev/pmd-stats-clear \
&& sleep 10 && ovs-appctl dpif-netdev/pmd-perf-show
-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::
+Example output, showing that during the last 10 seconds, 74.5% of iterations
+had a sleep of some length. The total amount of sleep time was 9.06 seconds
+and the average sleep time where a sleep was requested was 9 microseconds::
- - sleep iterations: 153994 ( 76.8 % of iterations)
- Sleep time (us): 9159399 ( 59 us/iteration avg.)
+ - sleep iterations: 977037 ( 74.5 % of iterations)
+ Sleep time (us): 9068841 ( 9 us/iteration avg.)
Any potential power saving from PMD load based sleeping is dependent on the
system configuration (e.g. enabling processor C-states) and workloads.
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 4f06e3f4e..c9f7179c3 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -177,7 +177,7 @@ static struct odp_support dp_netdev_support = {
/* Number of pkts Rx on an interface that will stop pmd thread sleeping. */
#define PMD_SLEEP_THRESH (NETDEV_MAX_BURST / 2)
/* Time in uS to increment a pmd thread sleep time. */
-#define PMD_SLEEP_INC_US 10
+#define PMD_SLEEP_INC_US 1
struct dpcls {
struct cmap_node node; /* Within dp_netdev_pmd_thread.classifiers */
@@ -4983,7 +4983,6 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config)
set_pmd_auto_lb(dp, autolb_state, log_autolb);
pmd_max_sleep = smap_get_ullong(other_config, "pmd-maxsleep", 0);
- pmd_max_sleep = ROUND_UP(pmd_max_sleep, 10);
pmd_max_sleep = MIN(PMD_RCU_QUIESCE_INTERVAL, pmd_max_sleep);
atomic_read_relaxed(&dp->pmd_max_sleep, &cur_pmd_max_sleep);
if (first_set_config || pmd_max_sleep != cur_pmd_max_sleep) {
diff --git a/tests/pmd.at b/tests/pmd.at
index e0f58f7a6..c707f762c 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -1266,7 +1266,7 @@ OVS_WAIT_UNTIL([tail ovs-vswitchd.log | grep "PMD load based sleeps are disabled
dnl Check low value max sleep
get_log_next_line_num
AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="1"])
-OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 10 usecs."])
+OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 1 usecs."])
OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
dnl Check high value max sleep
@@ -1294,8 +1294,8 @@ OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request
OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
dnl Check rounding
get_log_next_line_num
-AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="491"])
-OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 500 usecs."])
+AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="499"])
+OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 499 usecs."])
OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
OVS_VSWITCHD_STOP
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 8c4acfb18..2b57fc0e3 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -807,10 +807,6 @@
Rx queues that it polls.
</p>
<p>
- To avoid requesting very small sleeps (e.g. less than 10 us) the
- value will be rounded up to the nearest 10 us.
- </p>
- <p>
The maximum value is <code>10000 microseconds</code>.
</p>
</column>