Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2698441rwb; Wed, 30 Nov 2022 09:40:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf4v+m82ACsROxPYibx7U0LsAF1xaRGfqBjcAVl5BVRho/F4540Mdr5v/Iv/yRuwJSPEVeUJ X-Received: by 2002:a05:6402:5307:b0:461:e3e1:bc3b with SMTP id eo7-20020a056402530700b00461e3e1bc3bmr42509703edb.145.1669830024960; Wed, 30 Nov 2022 09:40:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669830024; cv=none; d=google.com; s=arc-20160816; b=qaFIaAIc7xV5u6gi0Qhvlg4GBq9RXeIETmwuvJ+XYBQaAsDXswFamE8+K+iVx/im7Y i7mQ2fczbrb6E9YBL5tGZSWRfsw1i6fttgLJatotKOhjjBlRNHGQAP2QdJl4EgH9XV+K 4NiwgIDkaenIBTjM/3ZLVT6nWPzw3TMisgcP6N8l9y001uHAbitORL1Eb5GJsiBbrmdR yhUEZmyKidPviRtFA33rkgL21ExHLTDjHOLFVHp+4da/eTBH0lTMVUGXNnLgWU+Vj4zd 6z0ISXSxRSGFNl5MTPdxvAxAOtVqctMZcJAvfF5yqQAbJ1SrGbmLzBNxC2eW8m/8cVKl HjEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lUAemTTAuGh3zw5mW6s7Xyv+4k5fmlrT6NKcggEAA4k=; b=ppNr8ixZuQdRqNjhwSe6h6uxI6uvf++bcqNmL8fsBzv6vuYWaP/PpgvvL59OGjDa0m SuFBUUP2mXsLtzmjxlKFfk/ZYYLazoRyik7v6Zl0QxBskqdZmT1d/rXkkBpvX5JpmEc/ NBX5tHyRJIXsAnXP6UCJXR1IALJXD+snbsQK27uquOWdbrRvX/zijlm8Z6TMMt9gpKNM KRZC12KchHMlcDNoA2i6drSp3APeUofA6tKWIbwolM9TcfWyqp4RQT4eEVSMHn5noixH MPFaCwxDPe/obhoB0PfpVRrYetyX1WDgl6kH53fiHCXA08eote7nxGMNmVAykiPId6X5 0U4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di7-20020a170906730700b007ad8bd5b636si1968696ejc.377.2022.11.30.09.40.04; Wed, 30 Nov 2022 09:40:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbiK3RSF (ORCPT + 83 others); Wed, 30 Nov 2022 12:18:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230429AbiK3RRq (ORCPT ); Wed, 30 Nov 2022 12:17:46 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A868332F for ; Wed, 30 Nov 2022 09:17:22 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0Qhx-0008EY-PB; Wed, 30 Nov 2022 18:17:17 +0100 Received: from pengutronix.de (unknown [IPv6:2a0a:edc0:0:701:cf48:5678:3bb0:eeda]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 14B1F12E2E6; Wed, 30 Nov 2022 17:17:16 +0000 (UTC) Date: Wed, 30 Nov 2022 18:17:15 +0100 From: Marc Kleine-Budde To: Markus Schneider-Pargmann Cc: Chandrasekar Ramakrishnan , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/15] can: m_can: Use transmit event FIFO watermark level interrupt Message-ID: <20221130171715.nujptzwnut7silbm@pengutronix.de> References: <20221116205308.2996556-1-msp@baylibre.com> <20221116205308.2996556-5-msp@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="r7p5tzu2udczjqwl" Content-Disposition: inline In-Reply-To: <20221116205308.2996556-5-msp@baylibre.com> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --r7p5tzu2udczjqwl Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 16.11.2022 21:52:57, Markus Schneider-Pargmann wrote: > Currently the only mode of operation is an interrupt for every transmit > event. This is inefficient for peripheral chips. Use the transmit FIFO > event watermark interrupt instead if the FIFO size is more than 2. Use > FIFOsize - 1 for the watermark so the interrupt is triggered early > enough to not stop transmitting. >=20 > Note that if the number of transmits is less than the watermark level, > the transmit events will not be processed until there is any other > interrupt. This will only affect statistic counters. Also there is an > interrupt every time the timestamp wraps around. >=20 > Signed-off-by: Markus Schneider-Pargmann Please make this configurable with the ethtool TX IRQ coalescing parameter. Please setup an hwtimer to enable the regular interrupt after some configurable time to avoid starving of the TX complete events. I've implemented this for the mcp251xfd driver, see: 656fc12ddaf8 ("can: mcp251xfd: add TX IRQ coalescing ethtool support") 169d00a25658 ("can: mcp251xfd: add TX IRQ coalescing support") 846990e0ed82 ("can: mcp251xfd: add RX IRQ coalescing ethtool support") 60a848c50d2d ("can: mcp251xfd: add RX IRQ coalescing support") 9263c2e92be9 ("can: mcp251xfd: ring: add support for runtime configurable R= X/TX ring parameters") Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --r7p5tzu2udczjqwl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmOHkBgACgkQrX5LkNig 012n+ggAkjxGu6fzc+XN6IqoY9Yn3LMia/azxxAbbRgcPD1gS4jBaulIPdVAon0D Veno5UPsOxB4yfraBvUylwROO0bkg9+vJG20XaDrExwMAU5CRfQ9qBjZBpHgj8VU PE9id632nhB1bJ9wWhqlV2W9vMkehQtRB+4sIqnfgQ1P2t9XgoM51NBDMF+fEkCR Y7k5p4kH5iCbIarx7R5nLQnnS77BxpSq3BiMd8ddlJGbumtECd0RqkL6JAq0P7D3 Xtkw9hylSQQEIHDxAEOlvDb4IQqXITE7CzjveDcrN+X43JPtLD09va6A3D95DrAR LzmklmW9y9pIgyz5htSCY0wFTCc96g== =DbHj -----END PGP SIGNATURE----- --r7p5tzu2udczjqwl--