Received: by 10.213.65.68 with SMTP id h4csp528538imn; Fri, 6 Apr 2018 04:44:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx494dbAuXj64s5SOkGyJgWkm/b0BuRkK6j0OThHdXhnnlaR22+dpIj8NWhWHFmDvFZ5ABlXt X-Received: by 10.98.102.79 with SMTP id a76mr20144637pfc.162.1523015062137; Fri, 06 Apr 2018 04:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523015062; cv=none; d=google.com; s=arc-20160816; b=Ygq2VX0AR+aXl5YQ4vB7UwU6o5iyn8FeJfq5uqQTW5FDMUEtqbqSWIryCII14gKsMn hMaPiSX08+MmuNoEzPdMxz3E/ayeulwpu54Voa4YYMp9teopON+DsdLblXg+7+yD7E8p uPbBXgnMXEP3mc7UmcIOZgYSKE5yx1gV1Sl5Pu8jCdGagCXRHo2StRzvN4+UeP2Rdr+G 5Kv68PQjk8eDkJSV1s9CnFLCPcYiXJVEunarRCGOwDv9UTsMpF18jBMCQMyPD7SAsYCn GxDTRonVveZcXkj5/3tl/KY2wSDcPiuezqvuKpSuF55UGxA1OoNNMBitnScEqXIEXGWw FxJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=swfwRB54ihV8mRxeuaN2rzQrUNg9bQ8SBq1gNLJhP3k=; b=qw9pJ3aVIGwqf3d3NZRPVfEscy/Lh8u/jfHVlaGlDtIxE9Zingcm8fq4IvB67zdALp GwJeq6JjAKmxMDJKJzPaf5lPFLSn6qPzi2LlYigtC2qMXbwqBOWnd1V13BzuC6K9IWGr L0/8dROXR8Qc6qkgPUcFJxN4NIw8kTeUrypxUX04OSH6wqspfh974cp/U2/iIPQFyHVS aOqjKRWyX/FuXpy7BwVl5qRCBOem8O2gXlAOsYG5uBb+70fcetpUSBrT0enujTlAAfVw mP1hWsfZQ6zBOp1Sn2mPCdnk97TGktzomI/0lm39k5ZbBUXPmKAlEFUtKGg+P0Qse0o8 8HVg== 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 a33-v6si8348368pld.125.2018.04.06.04.44.08; Fri, 06 Apr 2018 04:44:22 -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 S1752403AbeDFLmy (ORCPT + 99 others); Fri, 6 Apr 2018 07:42:54 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:54238 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752365AbeDFLmx (ORCPT ); Fri, 6 Apr 2018 07:42:53 -0400 Received: from alans-desktop (82-70-14-226.dsl.in-addr.zen.co.uk [82.70.14.226]) by fuzix.org (8.15.2/8.15.2) with ESMTP id w36Bglm5003572; Fri, 6 Apr 2018 12:42:47 +0100 Date: Fri, 6 Apr 2018 12:42:47 +0100 From: Alan Cox To: Muni Sekhar Cc: linux-serial , linux-kernel@vger.kernel.org, kernelnewbies Subject: Re: uart throughput Message-ID: <20180406124247.551e26a9@alans-desktop> In-Reply-To: References: Organization: Intel Corporation X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > The primary factor affecting UART throughput is the baud rate, apart > from this any other factors affect the UART throughput? UART CPU power interrupt latency all the usual suspects. > > For 4000000 bps uart baud rate, what should be the theoretical peak > data throughput? > Depends entirely what the uart is wired to, how it works and how the driver is written. If you've got bidirectional communication going on then you also need to consider latency and windowing. For a raw transfer over a decent UART with DMA with no post-processing I'd expect you can do the full line rate but it may eat a lot of CPU time. The uart code isn't particularly optimal for that kind of usage. It's not impossible to fix by fast-pathing the non N_TTY line discipline cases but nobody has found it a big enough pain to bother. Alan