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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92630CDB46E for ; Thu, 12 Oct 2023 10:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=oXuiqW8gNZd8dMrIHlcmtYNuJJZMJ9lJYvc4sETRDFA=; b=NwwP/1oHtKPUAr ABqSIWQocXA/71d4nyWxTBmd4KvlGRJ4Yg3WbnYE4W15fqIDGnrPB9GKrHpb1Xlxw6GOcIxw6ypCI u7mPfRqTG2+lwYydVxCY//ryvOySAuMLu5j+mUvltmySuIvqkXtiKCdu7SmJkED4qd+x9VYx+fehv A2RWjvsV0nEu8ybDYijE9C18CXM8FyV58glT19Ed3t8vzPDeNdg9ZVq6s7LIW851zxcyV6qpBski0 lG15jGeKcN3UlvNASXQzgVlseDHkbSozA/fo013FU9U5TTapXz8BahZo5BeZKH82aFJ2bvuxTq0VO VLUDIDtNPkZ0XQV+J2Dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqscS-000X1M-24; Thu, 12 Oct 2023 10:08:40 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqscP-000WyE-2Y for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 10:08:39 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-325e9cd483eso741745f8f.2 for ; Thu, 12 Oct 2023 03:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697105316; x=1697710116; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=T61YK6EFuEDV5qJWA4z7WzFbSG37tp0bqVIjSbOkXyE=; b=SZpHSj0zqkkUz1isOlyETJQFJk77LGQ0ZziYmlJT8DLVoQBXtR6vmYAZL+ihaf0ONs 2rG/DClUJw5JBSQXIiF5CLV8VW2pM9V6Gt4nH7GUEHrtfrFDYPxSE0PrrP52SdMpigh7 tvmuM2cjds0XwvKNAsns+PwiqQ14KT3M9o6XLJukHE90wmqdsmnWQ+Wxowv92oXl3mQ7 jrQwE99VUpzq8rN2YKePkRME6nqzwCW1ZGShEeS+iXewKSBO0qqLLNmmnr/DZ5ilsUI2 iuiJ34RVv7bIaXoLWLKAT8QJ5ZX5h+V1GAjS0/I3zF8Xq1cP8akO5yI8UCXFBSXdFEeS ZszA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697105316; x=1697710116; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T61YK6EFuEDV5qJWA4z7WzFbSG37tp0bqVIjSbOkXyE=; b=HvGzuFAAPu+pmda3iVYuys4TLGoHWJiCN8uruaW7ca3D2d9KG8l1dYeuHNNmlFzOvR f7xZ0zH5iklUcZ4NbnCEr+hZvwK3galcRMRff1AlHjdjpF2DdVeII5U0ZCMNC06dRTFR qSfiGeO+pa+aG37ny/5NbcPUs7UiBBuWwGxgxs49OzqPUdTamM5mtyvkuNzek9e0Wtks n1w4gTkC8v3kFeqhFPYphAcdFgwGrMwQwzupjDn0UKJfTXBpsPLR/9bnLeLzmBSek/cb Nxdf62Vw31eOZYt3LSUHjmZiQ6IsMmM/+gUXNMMauVjDZ6yCaIOzC8dmo9+uRRhGO8yb 2Kog== X-Gm-Message-State: AOJu0Yz3boZXRO1NeVxrCYgx+/YZiMkrwJgfqdtUZSZIKJQD4aSshEZy HlYdikjfcJXhRzbJQ9cVReI= X-Google-Smtp-Source: AGHT+IGY5/V2HmMll0R7ee8D+XKgPX1fVMvqjMxzETQE5YP729txcGhYLYxlO8b4P76nKez6ryZjLw== X-Received: by 2002:a5d:6447:0:b0:31f:fb5d:96da with SMTP id d7-20020a5d6447000000b0031ffb5d96damr21560136wrw.64.1697105315533; Thu, 12 Oct 2023 03:08:35 -0700 (PDT) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id dj16-20020a0560000b1000b003198a9d758dsm922737wrb.78.2023.10.12.03.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 03:08:35 -0700 (PDT) From: Christian Marangi To: Raju Rangoju , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Ping-Ke Shih , Kalle Valo , Simon Horman , Daniel Borkmann , Jiri Pirko , Hangbin Liu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-wireless@vger.kernel.org Cc: Christian Marangi Subject: [net-next PATCH v2 0/4] net: stmmac: improve tx timer logic Date: Thu, 12 Oct 2023 12:04:55 +0200 Message-Id: <20231012100459.6158-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_030837_837007_D896D78F X-CRM114-Status: GOOD ( 15.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series comes with the intention of restoring original performance of stmmac on some router/device that used the stmmac driver to handle gigabit traffic. More info are present in patch 3. This cover letter is to show results and improvements of the following change. The move to hr_timer for tx timer and commit 8fce33317023 ("net: stmmac: Rework coalesce timer and fix multi-queue races") caused big performance regression on these kind of device. This was observed on ipq806x that after kernel 4.19 couldn't handle gigabit speed anymore. The following series is currently applied and tested in OpenWrt SNAPSHOT and have great performance increase. (the scenario is qca8k switch + stmmac dwmac1000) Some good comparison can be found here [1]. The difference is from a swconfig scenario (where dsa tagging is not used so very low CPU impact in handling traffic) and DSA scenario where tagging is used and there is a minimal impact in the CPU. As can be notice even with DSA in place we have better perf. It was observed by other user that also SQM scenario with cake scheduler were improved in the order of 100mbps (this scenario is CPU limited and any increase of perf is caused by removing load on the CPU) Been at least 15 days that this is in use without any complain or bug reported about queue timeout. (was the case with v1 before the additional patch was added, only appear on real world tests and not on iperf tests) [1] https://forum.openwrt.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/3427?u=ansuel Changes v2: - Add patch to move tx timer arm outside tx clean. Christian Marangi (4): net: introduce napi_is_scheduled helper net: stmmac: improve TX timer arm logic net: stmmac: move TX timer arm after DMA enable net: stmmac: increase TX coalesce timer to 5ms drivers/net/ethernet/chelsio/cxgb3/sge.c | 8 ---- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 37 +++++++++++++++---- drivers/net/wireless/realtek/rtw89/core.c | 2 +- include/linux/netdevice.h | 23 ++++++++++++ net/core/dev.c | 2 +- 6 files changed, 56 insertions(+), 18 deletions(-) -- 2.40.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel