Re: [PATCH] net: sched: print jiffies when transmit queue time out

From: Eric Dumazet
Date: Wed Apr 19 2023 - 08:02:53 EST


On Wed, Apr 19, 2023 at 1:56 PM Yajun Deng <yajun.deng@xxxxxxxxx> wrote:
>
> Although there is watchdog_timeo to let users know when the transmit queue
> begin stall, but dev_watchdog() is called with an interval. The jiffies
> will always be greater than watchdog_timeo.
>
> To let users know the exact time the stall started, print jiffies when
> the transmit queue time out.
>
> Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>
> ---


> atomic_long_inc(&txq->trans_timeout);
> break;
> }
> @@ -522,8 +522,9 @@ static void dev_watchdog(struct timer_list *t)
>
> if (unlikely(some_queue_timedout)) {
> trace_net_dev_xmit_timeout(dev, i);
> - WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
> - dev->name, netdev_drivername(dev), i);
> + WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): \
> + transmit queue %u timed out %lu jiffies\n",
> + dev->name, netdev_drivername(dev), i, some_queue_timedout);

If we really want this, I suggest we export a time in ms units, using
jiffies_to_msecs()