On 2/21/20 9:24 PM, William Tu wrote: > The patch adds a new option 'use-intr' to enable afxdp interrupt > mode. At receive path, add a poll() syscall so that when there > is no packet arrived, the pmd thread will be blocked and this > saves some CPU time for other processes. This avoids burning the > CPU to always 100% when there is no traffic. Disabled by default.
Sleeping inside the PMD thread is not a good idea in general. If one port doesn't have packets this doesn't mean that other ports are idle too. With this patch, PMD thread will probably sleep for 1 second for each rxq without packets? Am I right? Also, sleeping while not in a quiescent state will produce additional issues will too late rcu calls and stalls of other threads waiting on rcu synchronization. I also spotted that you're entering quiescent state at some point, but who will end this state? PMD thread will continue working in a quiescent state and will probably crash while trying to use rcu-protected data structures like flow tables. IMHO, for this case you just need to create a non-pmd version of netdev-afxdp with rxq_wait() implemented. These ports will be handled by the main thread without consuming extra CPU resources. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
