Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Sep 2014 15:21:54 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Eric Joyner <ricera10@gmail.com>
Cc:        freebsd-net <freebsd-net@freebsd.org>, Ryan Stone <rysto32@gmail.com>
Subject:   Re: [PATCH] Convert ixl(4) and ixlv(4) to ifcounters, and fix some counter bugs
Message-ID:  <20140927112154.GO884@glebius.int.ru>
In-Reply-To: <CA%2Bb0zg-oN2CH-XRSNTm6O7O67BSHdscfC1ntLaZUeXi448S9xA@mail.gmail.com>
References:  <CAFMmRNyn0Kjr30Ew%2B8YRRvT-tMFH6WdprAAyJieLz_ABDNK8%2BA@mail.gmail.com> <20140925120810.GA884@FreeBSD.org> <CA%2Bb0zg-oN2CH-XRSNTm6O7O67BSHdscfC1ntLaZUeXi448S9xA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  Thanks, Eric.

  Ryan, will you commit?

  The cxgbe(4) is already updated by Navdeep. Me and melifaro@ are
finishing lagg(4). Once Intel drivers are done, we can go forward for
counter(9) in struct ifnet.

On Fri, Sep 26, 2014 at 03:25:59PM -0700, Eric Joyner wrote:
E> I approve of this patch -- I tested it on ixl and ixlv on stable/10, and at
E> least the sysctl stats still look good.
E> 
E> ---
E> - Eric Joyner
E> 
E> On Thu, Sep 25, 2014 at 5:08 AM, Gleb Smirnoff <glebius@freebsd.org> wrote:
E> 
E> > On Tue, Sep 23, 2014 at 07:18:51PM -0400, Ryan Stone wrote:
E> > R> The patch below converts the ixl(4) and ixlv(4) drivers to use the new
E> > R> ifcounter interface.  I've hidden the interface behind some macros to
E> > R> ensure that the driver continues to compile for FreeBSD 10 and
E> > R> earlier.  The result of the macros is that the ifcounter
E> > R> implementation is somewhat clunkier than I would have liked, but I
E> > R> preferred to try and share as much code between the legacy counter
E> > R> implementation and the ifcounter implementation.
E> > R>
E> > R> I have tested the ixl driver with head.  I have only compile-tested it
E> > R> for stable/10.
E> > R>
E> > R> This patch also fixes some counter bugs:
E> > R>
E> > R> - Ensure that tx discards are reported
E> > R> - There are actually two types of rx discard counters in the hardware.
E> > R> Currently the driver is only reporting discards from one of the two
E> > R> counters, so I fixed that
E> > R> - The ipackets and opackets counters were being unnecessarily
E> > R> incremented in the rx and tx paths.  This was racy, unnecessary (the
E> > R> counters also get explicitly set based on the values in HW counters)
E> > R> and very bad for performance -- the cacheline contained the counters
E> > R> was constantly bouncing between CPUs.  I saw this even with only one
E> > R> queue active, probably due to false sharing with some other field in
E> > R> the ifnet struct.
E> > R>
E> > R>
E> > https://people.freebsd.org/~rstone/patches/ixl/0005-Convert-ixl-and-ixlv-drivers-to-use-new-ifcounter-in.patch
E> >
E> > Thanks, Ryan!
E> >
E> > I'd suggest to use check against __FreeBSD_version >= 1100036.
E> >
E> > Can you please commit this? Navdeep promised to do cxgbe(4), Alexander
E> > is working on ixgbe. After that we can go forward with making counters
E> > in struct ifnet non-racy and cheap counter(9).
E> >
E> > --
E> > Totus tuus, Glebius.
E> > _______________________________________________
E> > freebsd-net@freebsd.org mailing list
E> > http://lists.freebsd.org/mailman/listinfo/freebsd-net
E> > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
E> >

-- 
Totus tuus, Glebius.



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