From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCC03C43603 for ; Mon, 9 Dec 2019 22:31:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CE6720726 for ; Mon, 9 Dec 2019 22:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbfLIWbL (ORCPT ); Mon, 9 Dec 2019 17:31:11 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:36536 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbfLIWbL (ORCPT ); Mon, 9 Dec 2019 17:31:11 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1c3::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 4AC1A15492874; Mon, 9 Dec 2019 14:31:10 -0800 (PST) Date: Mon, 09 Dec 2019 14:31:09 -0800 (PST) Message-Id: <20191209.143109.1010404838982057668.davem@davemloft.net> To: maowenan@huawei.com Cc: loke.chetan@gmail.com, willemb@google.com, edumazet@google.com, maximmi@mellanox.com, nhorman@tuxdriver.com, pabeni@redhat.com, yuehaibing@huawei.com, tglx@linutronix.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, xiaojiangfeng@huawei.com Subject: Re: [PATCH net] af_packet: set defaule value for tmo From: David Miller In-Reply-To: <20191209133125.59093-1-maowenan@huawei.com> References: <20191209133125.59093-1-maowenan@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 09 Dec 2019 14:31:10 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mao Wenan Date: Mon, 9 Dec 2019 21:31:25 +0800 > There is softlockup when using TPACKET_V3: > ... > NMI watchdog: BUG: soft lockup - CPU#2 stuck for 60010ms! > (__irq_svc) from [] (_raw_spin_unlock_irqrestore+0x44/0x54) > (_raw_spin_unlock_irqrestore) from [] (mod_timer+0x210/0x25c) > (mod_timer) from [] > (prb_retire_rx_blk_timer_expired+0x68/0x11c) > (prb_retire_rx_blk_timer_expired) from [] > (call_timer_fn+0x90/0x17c) > (call_timer_fn) from [] (run_timer_softirq+0x2d4/0x2fc) > (run_timer_softirq) from [] (__do_softirq+0x218/0x318) > (__do_softirq) from [] (irq_exit+0x88/0xac) > (irq_exit) from [] (msa_irq_exit+0x11c/0x1d4) > (msa_irq_exit) from [] (handle_IPI+0x650/0x7f4) > (handle_IPI) from [] (gic_handle_irq+0x108/0x118) > (gic_handle_irq) from [] (__irq_usr+0x44/0x5c) > ... > > If __ethtool_get_link_ksettings() is failed in > prb_calc_retire_blk_tmo(), msec and tmo will be zero, so tov_in_jiffies > is zero and the timer expire for retire_blk_timer is turn to > mod_timer(&pkc->retire_blk_timer, jiffies + 0), > which will trigger cpu usage of softirq is 100%. > > Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.") > Tested-by: Xiao Jiangfeng > Signed-off-by: Mao Wenan Applied, thanks.