Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2020 20:33:58 -0500
From:      Ryan Stone <rysto32@gmail.com>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r357051 - head/sys/dev/bge
Message-ID:  <CAFMmRNz3TVPfP7_fhBMa=gdN%2BM4OdCco3z1qO=mPOm57-QOsng@mail.gmail.com>
In-Reply-To: <20200124012458.GI1268@FreeBSD.org>
References:  <202001231636.00NGawrr080128@repo.freebsd.org> <CAFMmRNyP5nKPZ62c9yRktH4t23GAgnpc2u8kHhUevUCu3doAQQ@mail.gmail.com> <20200123230546.GG1268@FreeBSD.org> <CAFMmRNwhcV-%2BSsq_a1RZJYXC8wvnUDLDxdFeHD7PgL5wuierkg@mail.gmail.com> <20200124012458.GI1268@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 23, 2020 at 8:25 PM Gleb Smirnoff <glebius@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNz3TVPfP7_fhBMa=gdN%2BM4OdCco3z1qO=mPOm57-QOsng>