Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A27A3C433EF for ; Thu, 21 Apr 2022 13:24:22 +0000 (UTC) Received: from localhost ([::1]:46338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhWnF-0008Hd-En for qemu-devel@archiver.kernel.org; Thu, 21 Apr 2022 09:24:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhSds-0003pV-QM for qemu-devel@nongnu.org; Thu, 21 Apr 2022 04:58:24 -0400 Received: from thsbbfxrt01p.thalesgroup.com ([192.54.144.131]:50204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhSdq-0004at-B8 for qemu-devel@nongnu.org; Thu, 21 Apr 2022 04:58:24 -0400 Received: from thsbbfxrt01p.thalesgroup.com (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 4KkWfD0lrDz45hv for ; Thu, 21 Apr 2022 10:58:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thalesgroup.com; s=xrt20181201; t=1650531492; bh=Pqy7tN8S1xAaVy4xLvWATkWivka2KUL4ad0B1GEo+Js=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=d38oskwGW/ZoSu15UXirbxV2QoVG+ZxN5Dfh02zh6CeXX9wbWjnCMIlZShShbL1DF YniYaM8/jT4U1Tr6iIeThvo4rUlcKo62ZSwcjXR7/K5hLKw4X4f1DCh5bf7zwXTh26 c5i5RkllAcqhyzNA4/r/jO/LOsRekxHAHKduqKGNI3B6ACP070Keq2InAiyonzo9wm 5xgvFyiB+wyBI3cFsXzdT2zUYhCARODuPCC+Odv59XCTLCjZ9hdAH/YsB4tHPHTi0o B18/W8bgPhX0F5WT2NlFPXyTaoioiU3k/jz7FP2l5BuxHjAVAAqR7+/P07y6aeU+Hs 8IoXr1hn5BCqg== From: REITHER Robert To: "qemu-devel@nongnu.org" Subject: Q: TX (THR) throttling for serial interface? Thread-Topic: Q: TX (THR) throttling for serial interface? Thread-Index: AdhVXXZQcia7DCw6QumudAtIe19Dgw== Date: Thu, 21 Apr 2022 08:58:10 +0000 Message-ID: <786c5881f7044c689837cf61054a71dd@thalesgroup.com> Accept-Language: de-AT, en-US, fr-FR Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-pmwin-version: 4.0.3, Antivirus-Engine: 3.84.0, Antivirus-Data: 5.91 Content-Type: multipart/alternative; boundary="_000_786c5881f7044c689837cf61054a71ddthalesgroupcom_" MIME-Version: 1.0 Received-SPF: pass client-ip=192.54.144.131; envelope-from=robert.reither@thalesgroup.com; helo=thsbbfxrt01p.thalesgroup.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 21 Apr 2022 09:20:42 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --_000_786c5881f7044c689837cf61054a71ddthalesgroupcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, ich have (realtime) problems in a QEMU client, spending too much time with= the serial IRQ (INT 4) while sending massive data over the serial interfac= e (sttyS0) I've found out that IRQ loops as long as there is send data available (LSR_= THRE always 1, IIR_THRI always 1), which can lead to up to 1s IRQ time in m= y case. QEMU always drains the TX FIFO at once and will only set the UART register = bits afterwards. My Linux console is using serial interface(because we use the same image on= real hardware as also for the qemu client). In very old QEMU code I found the method to throttle the TX int (THROTTLE_T= X_INTERVAL) to probably avoid this behavior. https://code.grnet.gr/projects/qemu/repository/revisions/6936bfe514bbac7af4= b24fad9ed9688b78b5be69/entry/hw/serial.c Is there a way to do something similar in actual QEMU code (setting TX dela= y timer)? Or should I just try to switch to virtio_console? Thank you Robert --_000_786c5881f7044c689837cf61054a71ddthalesgroupcom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

ich have (realtime) problems in= a QEMU client, spending too  much time with the serial IRQ (INT 4) wh= ile sending massive data over the serial interface (sttyS0)

I’ve found out that IRQ l= oops as long as there is send data available (LSR_THRE always 1, IIR_THRI a= lways 1), which can lead to up to 1s IRQ time in my case.=

QEMU always drains the TX FIFO = at once and will only set the UART register bits afterwards.

 

My Linux console is using seria= l interface(because we use the same image on real hardware as also for the = qemu client).

 

In very old QEMU code I found t= he method to throttle the TX int (THROTTLE_TX_INTERVAL) to probably avoid t= his behavior.

https://code.grnet.gr/projects/qemu/repository/revisi= ons/6936bfe514bbac7af4b24fad9ed9688b78b5be69/entry/hw/serial.c

 

Is there a way to do something = similar in actual QEMU code (setting TX delay timer)?

Or should I just try to switch = to virtio_console?

 

Thank you

Robert

--_000_786c5881f7044c689837cf61054a71ddthalesgroupcom_--