linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pure polling mode for netdevices
@ 2016-10-21 18:03 Zach Brown
  2016-10-21 18:41 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Zach Brown @ 2016-10-21 18:03 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

Is there a way to get NAPI to poll all the time?
Or just any way to get netdevices to use only polling and no interrupts?

We have some rt targets where the jitter can be improved by disabling
interrupts and using just polling. In these cases we're okay with the
performance downsides that come with polling.

In particular we already have an implementation for the cadence macb driver
that does only polling mode and have verified that it improves the
jitter.

We're hoping for a more general existing solution or at the very least a
solution that would be accepted upstream. Any thoughts?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pure polling mode for netdevices
  2016-10-21 18:03 Pure polling mode for netdevices Zach Brown
@ 2016-10-21 18:41 ` Eric Dumazet
  2016-10-27 18:29   ` Zach Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2016-10-21 18:41 UTC (permalink / raw)
  To: Zach Brown; +Cc: netdev, linux-kernel

On Fri, 2016-10-21 at 13:03 -0500, Zach Brown wrote:
> Is there a way to get NAPI to poll all the time?
> Or just any way to get netdevices to use only polling and no interrupts?
> 
> We have some rt targets where the jitter can be improved by disabling
> interrupts and using just polling. In these cases we're okay with the
> performance downsides that come with polling.
> 
> In particular we already have an implementation for the cadence macb driver
> that does only polling mode and have verified that it improves the
> jitter.
> 
> We're hoping for a more general existing solution or at the very least a
> solution that would be accepted upstream. Any thoughts?

This is not yet done, although you could use busy poll infrastructure to
get this without a kernel change.

Open as many TCP flows are necessary to traverse all the queues you care
about, then loop on recvmsg() to trigger NAPI polling.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pure polling mode for netdevices
  2016-10-21 18:41 ` Eric Dumazet
@ 2016-10-27 18:29   ` Zach Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Zach Brown @ 2016-10-27 18:29 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, linux-kernel, linux-rt-users

On Fri, Oct 21, 2016 at 11:41:46AM -0700, Eric Dumazet wrote:
> On Fri, 2016-10-21 at 13:03 -0500, Zach Brown wrote:
> > Is there a way to get NAPI to poll all the time?
> > Or just any way to get netdevices to use only polling and no interrupts?
> > 
> > We have some rt targets where the jitter can be improved by disabling
> > interrupts and using just polling. In these cases we're okay with the
> > performance downsides that come with polling.
> > 
> > In particular we already have an implementation for the cadence macb driver
> > that does only polling mode and have verified that it improves the
> > jitter.
> > 
> > We're hoping for a more general existing solution or at the very least a
> > solution that would be accepted upstream. Any thoughts?
> 
> This is not yet done, although you could use busy poll infrastructure to
> get this without a kernel change.
> 
> Open as many TCP flows are necessary to traverse all the queues you care
> about, then loop on recvmsg() to trigger NAPI polling.
> 
> 

I looked into the busy poll infrastructure and I don't think it meets our
needs. We're not interested in minimizing the latency of the ethernet device,
but rather diminishing if not eliminating the system jitter cause by ethernet
interrupts. Not to mention that some interfaces like macb don't provide a lot
of the config options to make busy polling really work well. For example,
interrupt coalescing configuration. 

I was thinking more along the lines of an extenstion to the NAPI interface that
drivers can opt into that allows them to enter NAPI polling mode and never
leave when configured to do so.  

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-27 19:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 18:03 Pure polling mode for netdevices Zach Brown
2016-10-21 18:41 ` Eric Dumazet
2016-10-27 18:29   ` Zach Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).