Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3582156ybz; Mon, 20 Apr 2020 05:45:39 -0700 (PDT) X-Google-Smtp-Source: APiQypKa+JBjLQGhVIY9ghSdGdwsGLX6x9n9n6StkXtX29Bb3ncdJUy+eVjaGzdAbJeP4Rw9K/f8 X-Received: by 2002:a17:906:4ecd:: with SMTP id i13mr15863477ejv.68.1587386739628; Mon, 20 Apr 2020 05:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587386739; cv=none; d=google.com; s=arc-20160816; b=kI+dz4wQe1XT/wkgU9g0qAN0thgFkiKNuYdNRHy97/9CoEVRsBMr5fUzt4wvlYLPV8 LNKaShAPJs5xL4Zcxh9DrP0noZobXluyfpb8f6BP6VgPsK41uLykOWQPF+aM2x5ewVn0 C7CBAvemJnmRvqg65JB15eSLvRhfh5mlMfPq0UFkzzSIkRJx+JTMh1nVoylgroW+Y/Cy IHuP9yW+ErStREYLh/EZ4clNRofeumJW9IP049F8MKpsHQlr5c2LlKOmvZ6O/du0Kk0D GzvoCpPrzvYC2uUEL+zVD0lpEYg3FNs/2L3qoxRLagPE+pWDL9yCevO8S1jr++g4Udn0 YEKQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N32sFG25cEdGy6PTq0J9W7kqZtuV53W9EV4wuHccSnk=; b=byZbauci1Dx5OBJXiSvEwOBEHDak/1vl/EhtB+3sCgPn0f2CusTwoESEGwdFp5sjax YxrdtNQ9gOghkOfjUd/XBcUE/qLUReMkDoKrnkIclfPura2XVs7uW3QCrX7CTJnLnyxZ Rsuui/mOHamszIGhLMlXfmDtgsg7vwnOsZ/GlCjcQDp+pUo53Dn0amDVDQLgEGRUiK1V jPGjfvxw6cE14eZ34pTL/YaIOGniczFfYKF4hgqxjw/kdzVvPD6F1uQ4p1SBOpGUdAOw eqQIOBRGQxLtjqy+OM3BW+mIqzahvHotcvFMWiwpYnZ7KaT2lz46Fu4rlnDDVnCu/o8v RZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kKj4gvrw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si454017ejr.462.2020.04.20.05.45.16; Mon, 20 Apr 2020 05:45:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kKj4gvrw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728039AbgDTMlg (ORCPT + 99 others); Mon, 20 Apr 2020 08:41:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:34224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728025AbgDTMl3 (ORCPT ); Mon, 20 Apr 2020 08:41:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3D642070B; Mon, 20 Apr 2020 12:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587386489; bh=3P5XFnJeToC1IM3aWVCQCFPnSxBimrHVI6wb+QQBQlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kKj4gvrwbPm3Z36L51Cck2X8HAUrWj9T3S4mGUKeNYSrjAfwIBEtMfSyDE69hatDx JCS8a6gNuyl3GcYJ1A2oqjfP2i97B4qvm8EusL8WMGO4hmDcBJsN+BMkzfebne5kSs fS6YqYuqx7AoMBJr0mvYDCRXbBffdemYzUisKfrA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Yakunin , Konstantin Khlebnikov , "David S. Miller" Subject: [PATCH 5.5 09/65] net: revert default NAPI poll timeout to 2 jiffies Date: Mon, 20 Apr 2020 14:38:13 +0200 Message-Id: <20200420121508.605493972@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420121505.909671922@linuxfoundation.org> References: <20200420121505.909671922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Konstantin Khlebnikov [ Upstream commit a4837980fd9fa4c70a821d11831698901baef56b ] For HZ < 1000 timeout 2000us rounds up to 1 jiffy but expires randomly because next timer interrupt could come shortly after starting softirq. For commonly used CONFIG_HZ=1000 nothing changes. Fixes: 7acf8a1e8a28 ("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning") Reported-by: Dmitry Yakunin Signed-off-by: Konstantin Khlebnikov Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4090,7 +4090,8 @@ EXPORT_SYMBOL(netdev_max_backlog); int netdev_tstamp_prequeue __read_mostly = 1; int netdev_budget __read_mostly = 300; -unsigned int __read_mostly netdev_budget_usecs = 2000; +/* Must be at least 2 jiffes to guarantee 1 jiffy timeout */ +unsigned int __read_mostly netdev_budget_usecs = 2 * USEC_PER_SEC / HZ; int weight_p __read_mostly = 64; /* old backlog weight */ int dev_weight_rx_bias __read_mostly = 1; /* bias for backlog weight */ int dev_weight_tx_bias __read_mostly = 1; /* bias for output_queue quota */