mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-serial@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Johan Hovold <johan@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Insanely high baud rates
Date: Tue, 9 Oct 2018 12:19:04 -0700	[thread overview]
Message-ID: <3fcef1c1-d746-ae82-c0e6-f079b1a53ffb@zytor.com> (raw)

[Resending to a wider audience]

In trying to get the termios2 interface actually implemented in glibc,
the question came up if we will ever care about baud rates in excess of
4 Gbps, even in the relatively remote future.

If this is something we care about *at all*, I would like to suggest
that rather than defining yet another kernel interface, we steal some
bits from the MSB of the speed fields, alternatively one of the c_cc
bytes (all  likearchitectures seem to have c_cc[18] free) or some field,
if we can find them, in c_cflags, to indicate an exponent.

With 5 bits from the top of the speed fields, the current values would
be identical up to 248 Gbps, and values up to ~288 Pbps would be
encodable ±2 ppb.

In the short term, all we would have to do in the kernel would be
erroring out on baud rates higher than 0x0fffffff (2^28-1 due to
implicit one aliasing rhe first bit of a 5-bit exponent – less than 2^27
are functionally denorms.) However, I'd like to put the glibc
infrastructure for this now if this is something we may ever be
interested in.

Thoughts?
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

             reply	other threads:[~2018-10-09 19:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 19:19 H. Peter Anvin [this message]
2018-10-09 19:51 ` Willy Tarreau
2018-10-09 20:02   ` H. Peter Anvin
2018-10-10 20:17 ` Alan Cox
2018-10-10 20:20   ` hpa
2018-10-11 12:31     ` Alan Cox
2018-10-11 14:14       ` hpa
2018-10-11 21:40         ` Theodore Y. Ts'o
2018-10-12  5:48           ` H. Peter Anvin
2018-10-11 19:36       ` Craig Milo Rogers
2018-10-11 19:39         ` H. Peter Anvin

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=3fcef1c1-d746-ae82-c0e6-f079b1a53ffb@zytor.com \
    --to=hpa@zytor.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®