svn commit: r293854 - head/sys/dev/e1000

Marius Strobl marius at alchemy.franken.de
Mon Jan 18 23:41:52 UTC 2016


On Fri, Jan 15, 2016 at 12:11:27PM +1100, Kubilay Kocak wrote:
> On 14/01/2016 8:47 AM, Marius Strobl wrote:
> > Author: marius
> > Date: Wed Jan 13 21:47:27 2016
> > New Revision: 293854
> > URL: https://svnweb.freebsd.org/changeset/base/293854
> > 
> > Log:
> >   Given that em(4), lem(4) and igb(4) hardware doesn't require the
> >   alignment guarantees provided by m_defrag(9), use m_collapse(9)
> >   instead for performance reasons.
> >   While at it, sanitize the statistics softc members, i. e. retire
> >   unused ones and add SYSCTL nodes missing for actually used ones.
> >   
> >   Differential Revision:	https://reviews.freebsd.org/D4717
> > 
> > Modified:
> >   head/sys/dev/e1000/if_em.c
> >   head/sys/dev/e1000/if_em.h
> >   head/sys/dev/e1000/if_igb.c
> >   head/sys/dev/e1000/if_igb.h
> >   head/sys/dev/e1000/if_lem.c
> >   head/sys/dev/e1000/if_lem.h
> 
> What kind of performance / overhead delta can be expected for this change?
> 

Compared to m_collapse(9), m_defrag(9) is a real CPU hog. However,
bus_dmamap_load_mbuf_sg(9) should fail seldom enough with EFBIG
that you'll most likely not experience much of a difference in
practice.

Still, unnecessary use of m_defrag(9) in place of m_collapse(9)
should be avoided and at some point in time we actually had
managed to get rid of most of these cases. Unfortunately, such
code came back in a couple of drivers, mainly in vendor-supplied
ones.

> Is this worth MFC and/or Relnotes ?

The change is worth an MFC but not Relnotes.

Marius



More information about the svn-src-head mailing list