[ovs-dev] [PATCH] netdev-afxdp: Add interrupt mode using poll syscall.

William Tu u9012063 at gmail.com
Tue Feb 25 01:31:59 UTC 2020


On Mon, Feb 24, 2020 at 2:47 AM Ilya Maximets <i.maximets at ovn.org> wrote:
>
> 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?

Timeout will be 1 millisecond.
>
> 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.

Right, I should also end the quiescent state somewhere.

>
> 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.
>
Hi Ilya,

Thanks for your feedback.
I will work on the idea of setting to non-pmd version.

William


More information about the dev mailing list