Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2020 17:24:58 -0800
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        Ryan Stone <rysto32@gmail.com>
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:  <20200124012458.GI1268@FreeBSD.org>
In-Reply-To: <CAFMmRNwhcV-%2BSsq_a1RZJYXC8wvnUDLDxdFeHD7PgL5wuierkg@mail.gmail.com>
References:  <202001231636.00NGawrr080128@repo.freebsd.org> <CAFMmRNyP5nKPZ62c9yRktH4t23GAgnpc2u8kHhUevUCu3doAQQ@mail.gmail.com> <20200123230546.GG1268@FreeBSD.org> <CAFMmRNwhcV-%2BSsq_a1RZJYXC8wvnUDLDxdFeHD7PgL5wuierkg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 23, 2020 at 08:17:46PM -0500, Ryan Stone wrote:
R> On Thu, Jan 23, 2020 at 6:05 PM Gleb Smirnoff <glebius@freebsd.org> wrote:
R> >
R> > On Thu, Jan 23, 2020 at 02:17:33PM -0500, Ryan Stone wrote:
R> > R> What is a driver's responsibility now for entering/leaving the net epoch now?
R> >
R> > For drivers that are 'special', entering the net epoch is necessary. Special
R> > usually means running if_input outside network interrupt context.
R> >
R> > However, there is plan to generalize entering/exiting epoch for taskqueues
R> > and callouts.
R> 
R> Why on earth is it done that way rather than putting the network epoch
R> enter/exit in ether_input?  I'm with Ian; this sounds like a huge
R> layering violation.

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.

-- 
Gleb Smirnoff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200124012458.GI1268>