Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp57997imm; Tue, 9 Oct 2018 13:47:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV61xSi9HukrcJP4DnZn8/ekYSme8T2TYNS017AwB9cRNBasoEEOxwdnxOpBaZRFbPA3o1KcJ X-Received: by 2002:a65:609a:: with SMTP id t26-v6mr26444942pgu.41.1539118025699; Tue, 09 Oct 2018 13:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539118025; cv=none; d=google.com; s=arc-20160816; b=pi4pJHPYZ8v7NRwGpr0omfGEN2OA7mYMF9kz6gyB3CqSgcXotCPS0b2cz2dfICxN7u B7eoSH3mDAX2px/I/J3gvWa8qZ0PLbgs7dtx6NVUMJZdZRTCRj4GU4y6aRcyhln3qWEm f+ETygUbM1mSdavhTJlox3Jj/YnaT/9BtqCDx7epEjAXz4G/Y4IFPS0zG4zJ6GXisNCJ HPtSXlmU5YskDPj36RnhIRuoh+CNVp4nh0xlK3/1TYOZiOVbgBJqOdad3gGTVrsB4HPC zkx8BX8gNlTSr0YqL0Seou5BjxTgwu7KgKFcqsO+0+RD/YowuTxgkY6zQcJ1HnUCHHXP lp/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=r2cM0AHsM8kJ6QMLRyJUdX+SGLsABpUNvC1MbjQT2M0=; b=0b/Q2aZyJVbHPktA7r6SEc31z7Thf4S0Ju3WXAGUBXYtXa/53o6ik56/Vve7tTrik0 T1KtEGn0piAeI5qWFO3KL0y1QmU15P+3boL0j9lFwVCuESwfx2zHvkllDj1QqrL0fX6y Ax0/RJWj8EAmGWUsqr8ZcKKzEI/QTDpAY+6NXX8BW/2sL1KohDqFJhy8DuxfC7VeU6CQ wDDiC072Xe4R7yTvmTpVKu0EpSyQ6qCm2+yty/lM6/Mq+WdLVwf5Mw4kH3fgZ57XVpci DercHa13+0EHlSnS2jZpyslDCDxGNLlG8rDnaTduY5f1wujaK4HGNQvEipkjpCUp0fbo sKtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12-v6si21374180plt.115.2018.10.09.13.46.45; Tue, 09 Oct 2018 13:47:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727709AbeJJDKW (ORCPT + 99 others); Tue, 9 Oct 2018 23:10:22 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:34974 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbeJJDKW (ORCPT ); Tue, 9 Oct 2018 23:10:22 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id w99JpdSG030986; Tue, 9 Oct 2018 21:51:39 +0200 Date: Tue, 9 Oct 2018 21:51:39 +0200 From: Willy Tarreau To: "H. Peter Anvin" Cc: linux-serial@vger.kernel.org, Linux Kernel Mailing List , Greg Kroah-Hartman , Jiri Slaby , Johan Hovold , Alexander Viro Subject: Re: Insanely high baud rates Message-ID: <20181009195139.GB30972@1wt.eu> References: <3fcef1c1-d746-ae82-c0e6-f079b1a53ffb@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3fcef1c1-d746-ae82-c0e6-f079b1a53ffb@zytor.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 09, 2018 at 12:19:04PM -0700, H. Peter Anvin wrote: > [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? Just my two cents, maybe we can conclude that for now we don't care thus don't implement anything, but that everything you identified as a possible place to steal bits should be marked "reserved for future use, must be sent as zero". This will leave you ample room later to decide how to proceed (and maybe it will not be the bps that you'll want to change but the number of lanes, or word size, or bit encoding, especially at 4 Gbps). Regards, Willy