Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp173671rwr; Wed, 19 Apr 2023 20:05:33 -0700 (PDT) X-Google-Smtp-Source: AKy350acbtR8+Wy2X11W3sH2GMlb0zdfsYOH1E27QczkIbmjqE+5fmrOyJlfajlcF0t428aXuzMm X-Received: by 2002:a67:b103:0:b0:42e:65c8:724b with SMTP id w3-20020a67b103000000b0042e65c8724bmr284390vsl.3.1681959933517; Wed, 19 Apr 2023 20:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681959933; cv=none; d=google.com; s=arc-20160816; b=guvqR7x7dQawviB0lZm4YQJ0pIvFLIr9PDPQtt1B3xByiHY9OEAJx7nQ/E5ewL7pee mRmJWWnIVxrlPoomfvTmm0211W55usWe595pqlF1lnTtnYboCUrlHPXnTe/MBjovotaY 7Lp2J2OrqqKBwxyi9njrkV8DtkZ/0JMP8JsXoeWdQjtsvjRmvo2j6wGYmBAtLTqqmTx5 6j9TnwJtCegCf/+1dohk8VVKKS6WfvK1qYz3grtuvq92gXOEYvRWBXZk1xZIasjPPMsi fZZG8oEQy9QBC+Yc8M2JNPD7pIWeh2Y2D9u1yzCclQAxmq+GPbXLdjFLnQpAyXVAwXiO Lr8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:cc:to:subject:message-id :from:content-transfer-encoding:date:dkim-signature:mime-version; bh=WA6UVK8dj8ldPfIV6BLeh8Vlm+ePhRuqvYfYMkiPMtU=; b=je2suQC1H1W0gX7udnk3GBUhXPV1Qv8Upjx65nLhCJpYyHNOc95hMw6aHoCHVize1l YAQdEm/vqtRzpxEI1706BkaSNw+pCErSoz0O74fFZ9vomaqS0LyiHht6Jbhd6AywY/9X 3jlMDZmpzdlJlqV20S4Zibi8mVlHfSq7j4z3Az3y4ZAQCfobeaUt7rWSlQ59ZWqLvaWl up8kYoiLQZpvMZvQZpplS6FKxnuPtymH4M87CdikVl75qtXqfsQXAy6eZbUyub17gnNm 7Pp64HZTtRG+CzqCdloZ5dTwuhU1UbOiXR80H8PyH6fa5xnQ5MgRvvsq+zMmVaj5/JhX vx4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IJoj2c66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk31-20020a056102549f00b0042c91ab83casi159461vsb.819.2023.04.19.20.05.19; Wed, 19 Apr 2023 20:05:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IJoj2c66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233648AbjDTCt1 (ORCPT + 99 others); Wed, 19 Apr 2023 22:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbjDTCtZ (ORCPT ); Wed, 19 Apr 2023 22:49:25 -0400 Received: from out-17.mta1.migadu.com (out-17.mta1.migadu.com [95.215.58.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D93C510E0 for ; Wed, 19 Apr 2023 19:49:16 -0700 (PDT) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1681958955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WA6UVK8dj8ldPfIV6BLeh8Vlm+ePhRuqvYfYMkiPMtU=; b=IJoj2c66qQk0/sYbblqDvvKQuDn9sR4DCai/lySCGbLZPoWyGmiFefLjWtkd4FWX0OI+Go byo2+QMSBf3x1U/JVWt4W2AvD6Cyf01dieW0MaAKseWf+6YxvZtI/uU4Pvd3tjJc4rYTm1 VwCF8nSZwi/8K7M7IprGNu/YopYtdLg= Date: Thu, 20 Apr 2023 02:49:12 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Yajun Deng" Message-ID: <38876115ff2bd4756eca5d8d8f93a48e@linux.dev> Subject: Re: [PATCH] net: sched: print jiffies when transmit queue time out To: "Eric Dumazet" Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: <20230419115632.738730-1-yajun.deng@linux.dev> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org April 19, 2023 8:02 PM, "Eric Dumazet" wrote:=0A=0A= > On Wed, Apr 19, 2023 at 1:56 PM Yajun Deng wrote= :=0A> =0A>> Although there is watchdog_timeo to let users know when the t= ransmit queue=0A>> begin stall, but dev_watchdog() is called with an inte= rval. The jiffies=0A>> will always be greater than watchdog_timeo.=0A>> = =0A>> To let users know the exact time the stall started, print jiffies w= hen=0A>> the transmit queue time out.=0A>> =0A>> Signed-off-by: Yajun Den= g =0A>> ---=0A>> =0A>> atomic_long_inc(&txq->trans_= timeout);=0A>> break;=0A>> }=0A>> @@ -522,8 +522,9 @@ static void dev_wat= chdog(struct timer_list *t)=0A>> =0A>> if (unlikely(some_queue_timedout))= {=0A>> trace_net_dev_xmit_timeout(dev, i);=0A>> - WARN_ONCE(1, KERN_INFO= "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",=0A>> - dev->n= ame, netdev_drivername(dev), i);=0A>> + WARN_ONCE(1, KERN_INFO "NETDEV WA= TCHDOG: %s (%s): \=0A>> + transmit queue %u timed out %lu jiffies\n",=0A>= > + dev->name, netdev_drivername(dev), i, some_queue_timedout);=0A> =0A> = If we really want this, I suggest we export a time in ms units, using=0A>= jiffies_to_msecs()=0A=0AOK.