1. Apr 24, 2023
  2. Apr 23, 2023
    • Yajun Deng's avatar
      net: sched: Print msecs when transmit queue time out · 2f0f9465
      Yajun Deng authored
      
      
      The kernel will print several warnings in a short period of time
      when it stalls. Like this:
      
      First warning:
      [ 7100.097547] ------------[ cut here ]------------
      [ 7100.097550] NETDEV WATCHDOG: eno2 (xxx): transmit queue 8 timed out
      [ 7100.097571] WARNING: CPU: 8 PID: 0 at net/sched/sch_generic.c:467
                             dev_watchdog+0x260/0x270
      ...
      
      Second warning:
      [ 7147.756952] rcu: INFO: rcu_preempt self-detected stall on CPU
      [ 7147.756958] rcu:   24-....: (59999 ticks this GP) idle=546/1/0x400000000000000
                            softirq=367      3137/3673146 fqs=13844
      [ 7147.756960]        (t=60001 jiffies g=4322709 q=133381)
      [ 7147.756962] NMI backtrace for cpu 24
      ...
      
      We calculate that the transmit queue start stall should occur before
      7095s according to watchdog_timeo, the rcu start stall at 7087s.
      These two times are close together, it is difficult to confirm which
      happened first.
      
      To let users know the exact time the stall started, print msecs when
      the transmit queue time out.
      
      Signed-off-by: default avatarYajun Deng <yajun.deng@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f0f9465