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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19F0FC433E6 for ; Tue, 9 Mar 2021 12:58:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB7B965287 for ; Tue, 9 Mar 2021 12:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231180AbhCIM5a (ORCPT ); Tue, 9 Mar 2021 07:57:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231150AbhCIM5M (ORCPT ); Tue, 9 Mar 2021 07:57:12 -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 EFD45C06174A for ; Tue, 9 Mar 2021 04:57:11 -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 1lJbvC-0001Fz-GU; Tue, 09 Mar 2021 13:57:10 +0100 Received: from pengutronix.de (unknown [IPv6:2a03:f580:87bc:d400:4699:faa8:8510:ac25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) 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 522995F1816; Tue, 9 Mar 2021 12:57:09 +0000 (UTC) Date: Tue, 9 Mar 2021 13:57:08 +0100 From: Marc Kleine-Budde To: Vincent MAILHOL Cc: linux-can , Arunachalam Santhanam Subject: Re: [PATCH v12 1/1] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces Message-ID: <20210309125708.ei75tr5vp2sanfh6@pengutronix.de> References: <20210308163445.103636-1-mailhol.vincent@wanadoo.fr> <20210308163445.103636-2-mailhol.vincent@wanadoo.fr> <2b43e72b-c561-d144-c01e-c4ea361cc932@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gf6dco2plwpk64c5" Content-Disposition: inline In-Reply-To: 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-can@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-can@vger.kernel.org --gf6dco2plwpk64c5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 09.03.2021 21:45:58, Vincent MAILHOL wrote: > > On 3/8/21 5:34 PM, Vincent Mailhol wrote: > > > This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from > > > ETAS GmbH (https://www.etas.com/en/products/es58x.php). > > > > > > Co-developed-by: Arunachalam Santhanam > > > Signed-off-by: Arunachalam Santhanam > > > Signed-off-by: Vincent Mailhol > > > > I'm not sure if you're supposed to change dql.min_limit from the driver. >=20 > One thing for sure, I am the only one to do it. >=20 > The reason to do so is because benchmarks show me that values > below this threshold are not good for this device (and I try to > be very permissive on the values). >=20 > USB introduces a lot of latency and the small PDU of CAN does not > help. The BQL is here to remediate, however, the algorithms can > take time to adjust, especially if there are small bursts. > Modifying the dql.min_limit was the only solution I found to make > sure that packets can be sent in bulk even during small burst > events. >=20 > The BQL was not designed for USB nor was it designed for CAN > which probably explains why I am the first one to ever have > thought of using dql.min_limit like this. We can try to sneak it into the kernel or ask on the net-dev list for a proper interface[1] for setting sensible defaults to the min_limit. > Using dql.min_limit is a hack and I pledge guilty for it. However, > because this hack brings performance improvement, I would like to keep > it if you do not mind. Your explanation is very good and clear, what about sending new mail with this problem description to the netdev list? A proper solution might be something like dql_set_min_limit() with a static inline no-op of BQL is disabled. Looking at 114cf5802165 ("bql: Byte queue limits"), you want to include: - Tom Herbert - Eric Dumazet Marc [1] Having ifdefs to set the value in the driver is clearly a sign of some misuse :) --=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 | --gf6dco2plwpk64c5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmBHcKAACgkQqclaivrt 76knzAf+LIG7ZwF7ufHcPRU6C0wftUF4XLd++5PR+WSpY/+0saNoki0LjBcOzIH+ ql4ItZ8/pFM8/VS4mCKuN7nGRexjV99+kHYrqJMu3x8QD2J93rjIdXiUMt4IyBBp kJSCrZZUM1M1rL4mje5cxYCaT7Iu4SCAYlQEVP9sJYXtxchOGIMB/HGOgPjkdaJb bbIpQu98xqv6OjJCoucVMNYOyIW8+MZPK790PeWH/xkiK1QKvl0eENvO8e9bcmvX vK+eEVVBDJCGn0B6Ny5dBmfJ2bjmL0VTke1k+8Dp1StxxpcZuq5193szh/pFjJW8 cIGjOuTWnWYIR6PFe8dpYyVp8YURgg== =tvqS -----END PGP SIGNATURE----- --gf6dco2plwpk64c5--