From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Jiri Slaby <jirislaby@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>, Ian Ray <ian.ray@ge.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCHv4] serial: imx: Add DMA buffer configuration via sysfs
Date: Fri, 5 Mar 2021 13:06:12 +0100 [thread overview]
Message-ID: <YEIetFdcuYZU98s/@kroah.com> (raw)
In-Reply-To: <20210305115058.92284-1-sebastian.reichel@collabora.com>
On Fri, Mar 05, 2021 at 12:50:58PM +0100, Sebastian Reichel wrote:
> From: Fabien Lahoudere <fabien.lahoudere@collabora.com>
>
> In order to optimize serial communication (performance/throughput VS
> latency), we may need to tweak DMA period number and size. This adds
> sysfs attributes to configure those values before initialising DMA.
> The defaults will stay the same as before (16 buffers with a size of
> 1024 bytes). Afterwards the values can be read/write with the
> following sysfs files:
>
> /sys/class/tty/ttymxc*/dma_buffer_size
> /sys/class/tty/ttymxc*/dma_buffer_count
Ick no. Custom sysfs attributes for things like serial ports are crazy.
> This is mainly needed for GEHC CS ONE (arch/arm/boot/dts/imx53-ppd.dts),
> which has multiple microcontrollers connected via UART controlling. One
> of the UARTs is connected to an on-board microcontroller at 19200 baud,
> which constantly pushes critical data (so aging character detect
> interrupt will never trigger). This data must be processed at 50-200 Hz,
> so UART should return data in less than 5-20ms. With 1024 byte DMA
> buffer (and a constant data stream) the read operation instead needs
> 1024 byte / 19200 baud = 53.333ms, which is way too long (note: Worst
> Case would be remote processor sending data with short pauses <= 7
> characters, which would further increase this number). The current
> downstream kernel instead configures 24 bytes resulting in 1.25ms,
> but that is obviously not sensible for normal UART use cases and cannot
> be used as new default.
Why can't this be a device tree attribute? Why does this have to be a
sysfs thing that no one will know how to tune and set over time. This
hardware should not force a user to manually tune it to get it to work
properly, this isn't the 1990's anymore :(
Please never force a user to choose stuff like this, they never will
know what to do.
thanks,
greg k-h
next prev parent reply other threads:[~2021-03-05 12:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 11:50 [PATCHv4] serial: imx: Add DMA buffer configuration via sysfs Sebastian Reichel
2021-03-05 12:06 ` Greg Kroah-Hartman [this message]
2021-03-05 12:42 ` Sebastian Reichel
2021-04-05 21:44 ` Sebastian Reichel
2021-04-06 7:13 ` Greg Kroah-Hartman
2023-12-08 9:02 ` Uwe Kleine-König
2023-12-22 6:02 ` EXT: " Ian Ray
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=YEIetFdcuYZU98s/@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=festevam@gmail.com \
--cc=ian.ray@ge.com \
--cc=jirislaby@kernel.org \
--cc=kernel@collabora.com \
--cc=kernel@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sebastian.reichel@collabora.com \
--cc=shawnguo@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.