]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tty: increase the default flip buffer limit to 2*640K
authorManfred Schlaegl <manfred.schlaegl@ginzinger.com>
Mon, 28 Jan 2019 18:01:10 +0000 (19:01 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit4f9681347e8f1b543dc6618a121b1d3799d84429
tree73470ee6a9dc6b91d253eaa42e676c0607b4412a
parent3617de1e0f9b85663775d145b48b02ed80c08c57
tty: increase the default flip buffer limit to 2*640K

BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit 7ab57b76ebf632bf2231ccabe26bea33868118c6 ]

We increase the default limit for buffer memory allocation by a factor of
10 to 640K to prevent data loss when using fast serial interfaces.

For example when using RS485 without flow-control at speeds of 1Mbit/s
an upwards we've run into problems such as applications being too slow
to read out this buffer (on embedded devices based on imx53 or imx6).

If you want to write transmitted data to a slow SD card and thus have
realtime requirements, this limit can become a problem.

That shouldn't be the case and 640K buffers fix such problems for us.

This value is a maximum limit for allocation only. It has no effect
on systems that currently run fine. When transmission is slow enough
applications and hardware can keep up and increasing this limit
doesn't change anything.

It only _allows_ to allocate more than 2*64K in cases we currently fail to
allocate memory despite having some.

Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com>
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/tty/tty_buffer.c