svn commit: r357051 - head/sys/dev/bge

Ryan Stone rysto32 at gmail.com
Fri Jan 24 01:34:11 UTC 2020


On Thu, Jan 23, 2020 at 8:25 PM Gleb Smirnoff <glebius at freebsd.org> wrote:
> Because at interrupt level we can batch multiple packets in a single epoch.
> This speeds up unfiltered packet forwarding performance by 5%.
>
> With driver level pfil hooks I would claim even more improvement, because before
> the change we needed to enter epoch twice - once for filtering, than for ether_input.
>
> Epoch isn't a layer, it is a synchronisation primitive, so I disagree about
> statement on layering violation.

Epoch is a synchronization primitive, but the net_epoch is absolutely
a part of the networking layer.  If we need better batching then the
correct solution is to introduce a batched interface for drivers to
push packets up the stack, not to mess around at the interrupt layer.

Note that the only reason why this works for mlx4/mlx5 is that
linuxkpi *always* requests a INTR_TYPE_NET no matter what driver is
running.  This means that all drm graphics driver interrupts are now
running under the net_epoch:

https://svnweb.freebsd.org/base/head/sys/compat/linuxkpi/common/include/linux/interrupt.h?revision=352205&view=markup#l103


More information about the svn-src-all mailing list