Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8859772ybl; Fri, 17 Jan 2020 02:21:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxcG8Cv9AyjIs9HAUe8Ger4l71FF2sTcfYLsHwKDnqKqrrDge+B9LzQP37LzE41KdqWAjmb X-Received: by 2002:aca:2109:: with SMTP id 9mr2637930oiz.119.1579256501522; Fri, 17 Jan 2020 02:21:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579256501; cv=none; d=google.com; s=arc-20160816; b=u+UqosOEbqz1cf2/OAUvJYCW99Edm8MJkyl45mt5wEX19aG1R7EujolaoRGiL4jJ+W Rf7oA6eFSaTwoM+ibMjCIilhhzT8uix+hMRGV6Kybq57Hq899jjmOzdr9NAZCTNmjb+X cBAouTAbgsS8Vf/IeyaW9nzXYFsbG/zUp7ShOPRfADlFw6P8ktbKgHvp/U180TFHuXEP cHNRI4dZhWdneKZm22kAGCZX2942aemXMKoFPKHJnYdukTgicxZE16HxXzmyfMzi8Xo9 MpijOBZ+tfKDaAO2BmjD+HIEI8MVxTFtLJLv99QG0P8JjbF0PY1OXRWdTv+LYHEBe85I 3EUA== 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=huXh2oGWSRgCScJKSoFN5PmeT9IRTGrELDCuz2Dw7gI=; b=lmE0nPc/F2G0STSfRQnQRP4fe/bVDfYIMsYJ83XZplF8utKTHXsdwtcU1pfviwHEuL 3oIIMHGnJlCQTxULB50fRyGLf4aHG5y0Sy69kixnCjLxyMsf8QB5yI/y+x1GMF5BFnZ0 OC/MjFVocdQCrKt+A2SIhJNjspUYUEUICRQtR0gfktF8DHpe3KdhhQaFhYNWVCoNsYEB z+2eb4lOxXba8SWe0/jESGJ+t+oZ12M4+viKQUAAd7jDvrTqbtVwysuva5+7M9dK30Rf j+22xr2mJps5opzaV4ezco7YjghC6xJZNVVHNJ6nVLl5x2Aq8ryYsg3jwWKhtTl0JlJe 8d5g== 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 o13si15186269otp.27.2020.01.17.02.21.30; Fri, 17 Jan 2020 02:21:41 -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 S1727047AbgAQKUf (ORCPT + 99 others); Fri, 17 Jan 2020 05:20:35 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:48872 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbgAQKUe (ORCPT ); Fri, 17 Jan 2020 05:20:34 -0500 Received: from localhost (82-95-191-104.ip.xs4all.nl [82.95.191.104]) (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 A6279155CAC73; Fri, 17 Jan 2020 02:20:32 -0800 (PST) Date: Fri, 17 Jan 2020 02:20:30 -0800 (PST) Message-Id: <20200117.022030.458227945074641961.davem@davemloft.net> To: liuyonglong@huawei.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, salil.mehta@huawei.com, jakub.kicinski@netronome.com Subject: Re: [PATCH net] net: hns: fix soft lockup when there is not enough memory From: David Miller In-Reply-To: <1579160477-31030-1-git-send-email-liuyonglong@huawei.com> References: <1579160477-31030-1-git-send-email-liuyonglong@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.3 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]); Fri, 17 Jan 2020 02:20:34 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yonglong Liu Date: Thu, 16 Jan 2020 15:41:17 +0800 > When there is not enough memory and napi_alloc_skb() return NULL, > the HNS driver will print error message, and than try again, if > the memory is not enough for a while, huge error message and the > retry operation will cause soft lockup. > > When napi_alloc_skb() return NULL because of no memory, we can > get a warn_alloc() call trace, so this patch deletes the error > message. We already use polling mode to handle irq, but the > retry operation will render the polling weight inactive, this > patch just return budget when the rx is not completed to avoid > dead loop. > > Fixes: 36eedfde1a36 ("net: hns: Optimize hns_nic_common_poll for better performance") > Fixes: b5996f11ea54 ("net: add Hisilicon Network Subsystem basic ethernet support") > Signed-off-by: Yonglong Liu Applied and queued up for -stable.