Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1529537

Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses.

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses.
Date 2016-11-24 17:20 +0100
Message-ID <sH4UG-57A-27@gated-at.bofh.it> (permalink)
References <sGDrr-3NA-9@gated-at.bofh.it> <sGY2X-lZ-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Pavel Machek <pavel@ucw.cz>
Date: Thu, 24 Nov 2016 09:55:06 +0100

> Hi!
> 
>> I'm debugging strange delays during transmit in stmmac driver. They
>> seem to be present in 4.4 kernel (and older kernels, too). Workload is
>> burst of udp packets being sent, pause, burst of udp packets, ...
>> 
>> Test code is attached, I use these parameters for testing:
>> 
>> ./udp-test raw 10.0.0.6 1234 1000 100 30
>> 
>> The delays seem to be related to coalescing:
>> 
>> drivers/net/ethernet/stmicro/stmmac/common.h
>> #define STMMAC_COAL_TX_TIMER    40000
>> #define STMMAC_MAX_COAL_TX_TICK 100000
>> #define STMMAC_TX_MAX_FRAMES    256
>> 
>> If I lower the parameters, delays are gone, but I get netdev watchdog
>> backtrace followed by broken driver.
>> 
>> Any ideas what is going on there?
> 
> 4.9-rc6 still has the delays. With the
> 
> #define STMMAC_COAL_TX_TIMER 1000
> #define STMMAC_TX_MAX_FRAMES 2
> 
> settings, delays go away, and driver still works. (It fails fairly
> fast in 4.4). Good news. But the question still is: what is going on
> there?

256 packets looks way too large for being a trigger for aborting the
TX coalescing timer.

Looking more deeply into this, the driver is using non-highres timers
to implement the TX coalescing.  This simply cannot work.

1 HZ, which is the lowest granularity of non-highres timers in the
kernel, is variable as well as already too large of a delay for
effective TX coalescing.

I seriously think that the TX coalescing support should be ripped out
or disabled entirely until it is implemented properly in this driver.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

stmmac ethernet in kernel 4.4: coalescing related pauses? Pavel Machek <pavel@ucw.cz> - 2016-11-23 12:00 +0100
  stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-11-24 10:00 +0100
    Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-11-24 11:30 +0100
      Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@denx.de> - 2016-11-24 11:40 +0100
        [PATCH] stmmac ethernet: unify locking  Pavel Machek <pavel@ucw.cz> - 2016-11-24 11:50 +0100
          [PATCH] stmmac ethernet: remove cut & paste code Pavel Machek <pavel@ucw.cz> - 2016-11-24 12:10 +0100
            Re: [PATCH] stmmac ethernet: remove cut & paste code Joe Perches <joe@perches.com> - 2016-11-24 21:10 +0100
              Re: [PATCH] stmmac ethernet: remove cut & paste code Pavel Machek <pavel@ucw.cz> - 2016-11-24 23:00 +0100
                Re: [PATCH] stmmac ethernet: remove cut & paste code Joe Perches <joe@perches.com> - 2016-11-24 23:30 +0100
                Re: [PATCH] stmmac ethernet: remove cut & paste code Pavel Machek <pavel@ucw.cz> - 2016-11-28 13:00 +0100
                Re: [PATCH] stmmac ethernet: remove cut & paste code Joe Perches <joe@perches.com> - 2016-11-28 15:30 +0100
                Re: [PATCH] stmmac ethernet: remove cut & paste code Pavel Machek <pavel@ucw.cz> - 2016-11-28 15:40 +0100
                Re: [PATCH] stmmac ethernet: remove cut & paste code Joe Perches <joe@perches.com> - 2016-11-28 17:10 +0100
    Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. David Miller <davem@davemloft.net> - 2016-11-24 17:20 +0100
      Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-11-24 22:30 +0100
        Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 09:30 +0100
          Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-02 09:50 +0100
            Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 10:50 +0100
              Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-02 13:40 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 15:00 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Alexandre Torgue <alexandre.torgue@st.com> - 2016-12-02 15:30 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 17:10 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-05 13:40 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-05 13:10 +0100
              Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-05 11:40 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. "Lino Sanfilippo" <LinoSanfilippo@gmx.de> - 2016-12-05 12:50 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-05 23:20 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Lino Sanfilippo <LinoSanfilippo@gmx.de> - 2016-12-05 23:40 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-05 23:50 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Lino Sanfilippo <LinoSanfilippo@gmx.de> - 2016-12-06 00:00 +0100
                Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Lino Sanfilippo <LinoSanfilippo@gmx.de> - 2016-12-06 00:20 +0100
            Aw: Re: stmmac ethernet in kernel 4.9-rc6: coalescing related  pauses. "Lino Sanfilippo" <LinoSanfilippo@gmx.de> - 2016-12-02 15:10 +0100
              [RFC] Re: Re: stmmac ethernet in kernel 4.9-rc6: coalescing related  pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-07 13:40 +0100
                Re: [RFC] Re: Re: stmmac ethernet in kernel 4.9-rc6: coalescing  related pauses. Lino Sanfilippo <lsanfil@marvell.com> - 2016-12-07 14:20 +0100
          Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 09:50 +0100
          Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-12-05 13:00 +0100
      [PATCH] stmmac: fix comments, make debug output consistent Pavel Machek <pavel@ucw.cz> - 2016-11-28 13:00 +0100
        Re: [PATCH] stmmac: fix comments, make debug output consistent David Miller <davem@davemloft.net> - 2016-11-30 02:00 +0100
      Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Pavel Machek <pavel@ucw.cz> - 2016-11-28 13:20 +0100
      [PATCH] stmmac: reduce code duplication getting basic descriptors Pavel Machek <pavel@ucw.cz> - 2016-11-28 13:20 +0100
        Re: [PATCH] stmmac: reduce code duplication getting basic descriptors Alexandre Torgue <alexandre.torgue@st.com> - 2016-12-02 15:10 +0100
      [PATCH] stmmac: simplify flag assignment Pavel Machek <pavel@ucw.cz> - 2016-11-30 12:50 +0100
        Re: [PATCH] stmmac: simplify flag assignment David Miller <davem@davemloft.net> - 2016-12-01 21:30 +0100
          stmmac: turn coalescing / NAPI off in stmmac Pavel Machek <pavel@ucw.cz> - 2016-12-01 23:50 +0100
            Re: stmmac: turn coalescing / NAPI off in stmmac Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 09:50 +0100
              Re: stmmac: turn coalescing / NAPI off in stmmac Pavel Machek <pavel@ucw.cz> - 2016-12-02 11:50 +0100
                Re: stmmac: turn coalescing / NAPI off in stmmac Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 17:10 +0100
                Re: stmmac: turn coalescing / NAPI off in stmmac Pavel Machek <pavel@ucw.cz> - 2016-12-05 12:50 +0100
        Re: [PATCH] stmmac: simplify flag assignment Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 09:30 +0100
      [PATCH] stmmac: cleanup documenation, make it match reality Pavel Machek <pavel@ucw.cz> - 2016-12-01 11:40 +0100
        Re: [PATCH] stmmac: cleanup documenation, make it match reality David Miller <davem@davemloft.net> - 2016-12-03 21:10 +0100
      [PATCH] stmmac: disable tx coalescing Pavel Machek <pavel@ucw.cz> - 2016-12-05 13:30 +0100
  Re: stmmac ethernet in kernel 4.4: coalescing related pauses? Lino Sanfilippo <lsanfil@marvell.com> - 2016-11-28 14:10 +0100
    Re: stmmac ethernet in kernel 4.4: coalescing related pauses? David Miller <davem@davemloft.net> - 2016-11-28 16:00 +0100
      Re: stmmac ethernet in kernel 4.4: coalescing related pauses? Lino Sanfilippo <lsanfil@marvell.com> - 2016-11-28 16:40 +0100
      Re: stmmac ethernet in kernel 4.4: coalescing related pauses? Eric Dumazet <eric.dumazet@gmail.com> - 2016-11-28 16:40 +0100
        Re: stmmac ethernet in kernel 4.4: coalescing related pauses? Lino Sanfilippo <lsanfil@marvell.com> - 2016-11-28 17:00 +0100
          Re: stmmac ethernet in kernel 4.4: coalescing related pauses? David Miller <davem@davemloft.net> - 2016-11-28 17:40 +0100
            Re: stmmac ethernet in kernel 4.4: coalescing related pauses? Lino Sanfilippo <lsanfil@marvell.com> - 2016-11-28 18:10 +0100
        Re: stmmac ethernet in kernel 4.4: coalescing related pauses? Pavel Machek <pavel@ucw.cz> - 2016-11-30 11:30 +0100

csiph-web