Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3793132ybz; Mon, 20 Apr 2020 09:32:39 -0700 (PDT) X-Google-Smtp-Source: APiQypL7cifKwGUTbMjkxPoqW55Gq34IXqVQ/OurVyaVOb/muOvTP4e4f4gR7jHhSEFZYEpB844G X-Received: by 2002:a17:906:4548:: with SMTP id s8mr16530819ejq.349.1587400359274; Mon, 20 Apr 2020 09:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587400359; cv=none; d=google.com; s=arc-20160816; b=DWnGmu2e4e/J+i/S1OgtFzEL8Uw3m/JAHptgj73iZuy39zSXsJ90NDdiKlICyIhazd N9aa1DaI1XX58nMAJ3BLVF/Q3wImdileKo51jylRLiH/U6bid/+DgUr5wb177zhDyeV9 QTkX/o++Fqp8+df7L/9929wlL5tpmk7mDGZusKkHxRZcp1ur8PKdD5U4uSgbI2/Okm0y P+UodUIDc/QZ6emuCUhVOqsay2A1huX3aahQjgNptDZB8FMseg+hTQ3sm/ep1GFOOO69 N+yh1vZ6Lc710uTl/6xxwzt1iR5nVLB7IULazee2EfjhJLgDTaahrfDSzGV1mX4eHdvO Mr2Q== 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=auyaWcGVLRnQZzxMyY5J9ZYenVcYLIesQRJr3/e56Cs=; b=pWJlWyyck7mCuzc7u4UStSTaMf0BPnRW7mWXZq/mPgqM7kXoFyeQpLFIUJrdxgBMBq b7cB4d1hZ9ZhfRfgsY39NwNLj2DjeBMNkgXrn83u728QB+7STgO87BzCTsAloDTv9bHf PM5owO1LVlaZhXYMaQ/qUsjw/4snKcfFPJDljJpyKK4BNFSNE+CZwuewVjDz/lIiK3JS lP3PxlFiZE9QwnLoLw8/5l8M/UBCCQxFA8zXMI2AwsufNbdq74qaqnUQ2C3zA2GjyOkS hzRTeJpF5fbw9s7/x/HyUeNOAot1DCWL/VVvHDM5BJ91ZQBv+yC6hYNIrcyzOtKcTiVs qPQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1Oo95t4V; 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 v21si824354edl.93.2020.04.20.09.32.15; Mon, 20 Apr 2020 09:32: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=1Oo95t4V; 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 S1729075AbgDTMrX (ORCPT + 99 others); Mon, 20 Apr 2020 08:47:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:43276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729071AbgDTMrV (ORCPT ); Mon, 20 Apr 2020 08:47:21 -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 6D91422242; Mon, 20 Apr 2020 12:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587386840; bh=X+b+QV3PvZjiosKYrqlH8COZv8vfZjJYoAlH/tuFyhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1Oo95t4VBiyVYqmSa/u35cGd1YnJf+cZAn1n9F9J0DDu/SVgySVv5tpaEDsg764lU Q+0/KkhoSTICAO94nmYS8j8eWwx2GcbJVFTM2ZxUUeHaihDVE8oQbtrxarsU1tnFx/ 7U8lX/6ja8+9WX+vSmZGHJrYer5alcscDEziS06E= 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.4 09/60] net: revert default NAPI poll timeout to 2 jiffies Date: Mon, 20 Apr 2020 14:38:47 +0200 Message-Id: <20200420121503.672835099@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420121500.490651540@linuxfoundation.org> References: <20200420121500.490651540@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 @@ -3863,7 +3863,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 */