From patchwork Tue Sep 3 18:49:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13789219 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 2C461CD37AB for ; Tue, 3 Sep 2024 18:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MIb0qyTQudG0fpbEz1UuMVklvKc5AdRSngdIS0lJCgE=; b=ubpCYWW3HIcEOW+HtqWYORtHA3 KziO28ToWJAuB0zvASU9U57p3XhyzVH3bwf8Pda/8G2cADsSYCofhWe5Ynqx9KvuyLY3VjB51QjNO 6pRqPNBBMZQW0J4avkEgcsX/2cfvS8lVprI193qckhnX5rUEpm6dk8E9pZn4jT0YimbVqdcsHtTqA nss9EoZs/ggOV3uOhIMRmyLXNkJyQ3+x2jYHLUYJclvyp2XBKtioRxdsynzXLyLvodZHv8+Yx4LMc eFha2DCCSXEnIJGsyZL2sBIpo6Fv13HgZhQKeYeEb4mWKMFHPRtWVF+tN68xhLMHQ3bVmwHnDU9xH +AXQUchA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slYcO-00000001WAE-44WT; Tue, 03 Sep 2024 18:51:08 +0000 Received: from out-176.mta1.migadu.com ([95.215.58.176]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slYaf-00000001Vo4-1DW3 for linux-arm-kernel@lists.infradead.org; Tue, 03 Sep 2024 18:49:22 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725389358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MIb0qyTQudG0fpbEz1UuMVklvKc5AdRSngdIS0lJCgE=; b=n3zVjc0IhfgRIHR3uqmQcJsNEatTA3DxBaun95AH8RjS1MsCp5sxeVPUgfASGZvV8Dvpk/ 0y8RvoK4Q3mXYbjaJ+VAWplI4049Wo41o8NfYMMwJCSDWBrV++drgiCHmoNo1e7WkW1EwP 3kSKlXvEUy8AKR9TSvv5A0onMshvKGs= From: Sean Anderson To: Nicolas Ferre , Claudiu Beznea , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: Michal Simek , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH net-next] net: cadence: macb: Enable software IRQ coalescing by default Date: Tue, 3 Sep 2024 14:49:12 -0400 Message-Id: <20240903184912.4151926-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240903_114921_501787_E857D74E X-CRM114-Status: UNSURE ( 8.42 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This NIC doesn't have hardware IRQ coalescing. Under high load, interrupts can adversely affect performance. To mitigate this, enable software IRQ coalescing by default. On my system this increases receive throughput with iperf3 from 853 MBit/sec to 934 MBit/s, decreases interrupts from 69489/sec to 2016/sec, and decreases CPU utilization from 27% (4x Cortex-A53) to 14%. Latency is not affected (as far as I can tell). Signed-off-by: Sean Anderson Reviewed-by: Simon Horman --- drivers/net/ethernet/cadence/macb_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 127bb3208034..8e1e4b2b2386 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4184,6 +4184,8 @@ static int macb_init(struct platform_device *pdev) dev->ethtool_ops = &macb_ethtool_ops; } + netdev_sw_irq_coalesce_default_on(dev); + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; /* Set features */