Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4646725ybl; Mon, 9 Dec 2019 14:32:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzgf/J7jTvkZmsrQHjd4/vRT8O95g6OlqJHq10Ii9EyJVz8OSZiKWoJGoY3w9nLPqmj0012 X-Received: by 2002:a9d:7147:: with SMTP id y7mr22578598otj.353.1575930779686; Mon, 09 Dec 2019 14:32:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575930779; cv=none; d=google.com; s=arc-20160816; b=1LODJcQvc0DKDEnfbdU2neGMm/JVLK8ExDPl35ybUPzrzCQJmrfmtqxRvg4NHVl+f3 LpHTP0F99vJpJCS/t6XStM+7oqrV9CzLG81F9EpP4H/a0ZNsL0VLy+0PQGq6sL9p+bNp hxjzpkEI/mXdPwpseYth10pbf9H+X8oNfLahRUkEkoNGvPbUH3Ar0YVqgttvOt7T+PhN HeZtt8c/P3UzCnW6bi7K/wPpPc+z6MTzyYyffw3osPki3Iztm6jgqtwcmMxU0GDUAvce 3+4OWVZMLJKgVkCqY0vrmTG86whw0yTymTps+Ei+vNKNx1MIjwuoZXTPAVdEHYLIwBID 9A2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=VFdLu6I6V8kHW9l5CRxS+J9eVmoUw6Jrw+JIvJ+QJsc=; b=K8C4IqMZ9kY0U4RpAmcASAC/vy16qnAst7JyIMPGM8XQKsPwyDcOBu+0RQviXWl371 lBouT10JuqjCMjlkfQCXROP2/kqaI/FJp03JB/yYB4el9KfISISMfCe3vQBUq74nWWlF wdFh5uavarxGF3mNcrwS5OTOiGm99CnWFMGWoRmkYcRAJAxbJA6lelMXEPryo4nnCMi0 83ueJTCYNXpzkCm+4CZ0FUhBjhxb6tWD6WUaRwmhvWZuR/Hy2bim03XHy8CY/Aw092ps lKiPMRn+PTKKaNM0ffOf86VdDq8bWv5rlquuWbMenz9fdBIkmE4aI9xwvzrm1webxfET mu1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 185si784562oii.256.2019.12.09.14.32.47; Mon, 09 Dec 2019 14:32:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbfLIWbL (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.