[PATCH 4/6] sfxge: add counter for Tx errors returned from if_transmit
Andrew Rybchenko
Andrew.Rybchenko at oktetlabs.ru
Wed Mar 19 05:44:56 UTC 2014
Gleb,
On 03/18/2014 04:59 PM, Gleb Smirnoff wrote:
> Andrew, Boris,
>
> On Tue, Mar 18, 2014 at 01:58:40PM +0400, Andrew Rybchenko wrote:
> A> sfxge: add counter for Tx errors returned from if_transmit
> A>
> A> Submitted-by: Boris Misenov <Boris.Misenov at oktetlabs.ru>
> A> Sponsored by: Solarflare Communications, Inc.
>
> I'd suggest not to use atomic(9) increment there, since it locks
> memory bus and thus has performance impact. Using ++ would be fine,
> since we probably don't care about absolute precision of this
> counter.
We think that usage of atomic here is appropriate since it is not on
fast path. CPU has already overfilled both HW and SW Tx queues.
> However, if you are interested in precision and also in performance,
> I'd suggest you to convert all statistics in sfxge(4) that are shared
> between CPUs to the counter(9) framework.
Yes, we have seen the framework. It looks really good and would use it
in the case of fast path counter. Other problem that it is available
since 10.0 only.
> More info on it can be found in manual page and some measurements
> are available here:
>
> http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html
Thanks a lot. We'll have a look.
> If you insist, I can apply your patch as is. The only problem is that
> when you send patches inlined into email, your MUA mangles all TABs
> to spaces, so I can't apply your patches. If it possible, next time
> send them as attachments.
I didn't know it. I guess you have seen that I've sent the first patch
twice (I'm sorry for that). The first one has patch in attachment, but
it is not shown in mailman web interface and I need to download the
patch to have a look and I've decided that it is not I think it is very
inconvenient. I can include both inline and attached patch, but it will
double mail size. Is the any best practice how to send patches to
mailing list?
Thanks a lot,
Andrew.
More information about the freebsd-net
mailing list