[ovs-discuss] 02bb2824e51d ("dpif-netdev: do hw flow offload in a thread")

Eli Britstein elibr at mellanox.com
Thu Feb 20 17:48:44 UTC 2020


Hello,

Working in non quiescent state in this thread is necessary, as done in 
6c95dbf96bed ("dpif-netdev: End the quiescent state for flow offloading 
thread.").

However, when there are a lot of flows to offload, and if 
rte_flow_create/rte_flow_destroy take a while,makes the thread stay 
longer times in non-quiescent state (only when the list is empty it is 
in quiescent state), which make ovs-appctl commands not to be responsive.

This is because ovsrcu_synchronize doesn't have the chance to work. See 
pstack status below.

Thread 1 (Thread 0x7f44e6c40000 (LWP 16171)):
#0  0x00007f44e4afabed in poll () from /lib64/libc.so.6
#1  0x0000000001f25ec0 in time_poll (pollfds=0x3e9e200, n_pollfds=2, 
handles=0x0, timeout_when=188204751, elapsed=0x7fff18af23dc) at 
lib/timeval.c:326
#2  0x0000000001f08986 in poll_block () at lib/poll-loop.c:364
#3  0x0000000001ee8e9e in ovsrcu_synchronize () at lib/ovs-rcu.c:236
#4  0x0000000001de865b in xlate_txn_commit () at 
ofproto/ofproto-dpif-xlate.c:1179
#5  0x0000000001dbd7ab in type_run (type=0x432e6730 "netdev") at 
ofproto/ofproto-dpif.c:485
#6  0x0000000001daad9e in ofproto_type_run (datapath_type=0x432e6730 
"netdev") at ofproto/ofproto.c:1733
#7  0x0000000001d9b44b in bridge_run__ () at vswitchd/bridge.c:2965
#8  0x0000000001d9b6ac in bridge_run () at vswitchd/bridge.c:3029
#9  0x0000000001da0cdf in main (argc=11, argv=0x7fff18af2838) at 
vswitchd/ovs-vswitchd.c:127

This is the same thread serving the commands.

In the log, there are messages like:

2020-02-20T17:43:52.203Z|00003|ovs_rcu(urcu2)|WARN|blocked 4000 ms 
waiting for dp_netdev_flow_ to quiesce
2020-02-20T17:43:53.799Z|00134|ovs_rcu|WARN|blocked 4001 ms waiting for 
dp_netdev_flow_ to quiesce
2020-02-20T17:43:56.203Z|00004|ovs_rcu(urcu2)|WARN|blocked 8001 ms 
waiting for dp_netdev_flow_ to quiesce
2020-02-20T17:43:57.798Z|00135|ovs_rcu|WARN|blocked 8000 ms waiting for 
dp_netdev_flow_ to quiesce
2020-02-20T17:44:04.203Z|00005|ovs_rcu(urcu2)|WARN|blocked 16001 ms 
waiting for dp_netdev_flow_ to quiesce
2020-02-20T17:44:05.798Z|00136|ovs_rcu|WARN|blocked 16000 ms waiting for 
dp_netdev_flow_ to quiesce
2020-02-20T17:44:20.202Z|00006|ovs_rcu(urcu2)|WARN|blocked 32000 ms 
waiting for dp_netdev_flow_ to quiesce
2020-02-20T17:44:21.799Z|00137|ovs_rcu|WARN|blocked 32000 ms waiting for 
dp_netdev_flow_ to quiesce
2020-02-20T17:44:52.202Z|00007|ovs_rcu(urcu2)|WARN|blocked 64000 ms 
waiting for dp_netdev_flow_ to quiesce
2020-02-20T17:44:53.798Z|00138|ovs_rcu|WARN|blocked 64000 ms waiting for 
dp_netdev_flow_ to quiesce


On one hand I don't want to stall the offloading, but on the other hand 
I would like responsiveness for ovs-appctl commands.

Do you have an idea how to enable both?


Thanks,

Eli



More information about the discuss mailing list