linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Cc: linux-can <linux-can@vger.kernel.org>,
	Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
Subject: Re: [PATCH v12 1/1] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces
Date: Tue, 9 Mar 2021 13:57:08 +0100	[thread overview]
Message-ID: <20210309125708.ei75tr5vp2sanfh6@pengutronix.de> (raw)
In-Reply-To: <CAMZ6RqJADCFL_=uv-=hNjiNj+CZkUDNWjLTP3eV010KGj+H49A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]

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 <arunachalam.santhanam@in.bosch.com>
> > > Signed-off-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
> > > Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
> >
> > I'm not sure if you're supposed to change dql.min_limit from the driver.
> 
> One thing for sure, I am the only one to do it.
> 
> 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).
> 
> 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.
> 
> 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 <therbert@google.com>
- Eric Dumazet <eric.dumazet@gmail.com>

Marc

[1] Having ifdefs to set the value in the driver is clearly a sign of
some misuse :)

-- 
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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-03-09 12:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 16:34 [PATCH v12 0/1] Introducing ETAS ES58X CAN USB interfaces Vincent Mailhol
2021-03-09  8:30 ` Jimmy Assarsson
2021-03-09 12:18   ` Vincent MAILHOL
2021-03-09 12:21     ` Jimmy Assarsson
     [not found] ` <20210308163445.103636-2-mailhol.vincent@wanadoo.fr>
2021-03-09 10:27   ` [PATCH v12 1/1] can: usb: etas_es58X: add support for " Marc Kleine-Budde
2021-03-09 12:45     ` Vincent MAILHOL
2021-03-09 12:57       ` Marc Kleine-Budde [this message]
2021-03-09 13:10         ` Vincent MAILHOL
2021-03-09 15:35           ` Marc Kleine-Budde
2021-03-09 17:54             ` Vincent MAILHOL
2021-03-09 18:26               ` Vincent MAILHOL
2021-03-09 20:26                 ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210309125708.ei75tr5vp2sanfh6@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=arunachalam.santhanam@in.bosch.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).