From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, antonynpavlov@gmail.com
Subject: [Qemu-devel] [PATCH v1 00/11] Cadence UART cleanups and Tx path fixes
Date: Mon, 16 Dec 2013 17:39:49 -0800 [thread overview]
Message-ID: <cover.1387244071.git.peter.crosthwaite@xilinx.com> (raw)
When using QEMU in some terminal environments, char back-ends for serial
devices can return EAGAIN for non trivial periods. This coupled with use
of qemu_chr_fe_write_all() is a leading cause of:
main-loop: WARNING: I/O thread spun for 1000 iterations
This series fixes this for cadence_uart by replacing the open loop
tx-write logic with a proper closed-loop that is responsive to the
back-end short return.
Various trivial cleanups are at the front of the series. Last patch is
the main event.
There is also a major performance increase with removal of the tx timer
logic (P7).
As a test, I've been using QEMU in a terminal over trans-pacific SSH.
Before this series:
$ time ./qemu-build/arm-softmmu/qemu-system-arm -M xilinx-zynq-a9 ...
main-loop: WARNING: I/O thread spun for 1000 iterations
Booting Linux on physical CPU 0x0
...
PetaLinux v2013.04 (Yocto 1.3) zynq ttyPS0
zynq login: QEMU: Terminated
real 2m26.908s
user 1m41.430s
sys 1m7.116s
And after:
$ time ./qemu-build/arm-softmmu/qemu-system-arm -M xilinx-zynq-a9 ...
Booting Linux on physical CPU 0x0
...
PetaLinux v2013.04 (Yocto 1.3) zynq ttyPS0
zynq login: QEMU: Terminated
real 0m16.149s
user 0m10.357s
sys 0m0.164s
Peter Crosthwaite (11):
char/cadence_uart: Mark struct fields as public/private
char/cadence_uart: Add missing uart_update_state
char/cadence_uart: Fix reset.
char/cadence_uart: s/r_fifo/rx_fifo
char/cadence_uart: Simplify status generation
char/cadence_uart: Define Missing SR/ISR fields
char/cadence_uart: Remove TX timer & add TX FIFO state
char/cadence_uart: Fix can_receive logic
char/cadence_uart: Use the TX fifo for transmission
char/cadence_uart: Delete redundant rx rst logic
char/cadence_uart: Implement Tx flow control
hw/char/cadence_uart.c | 153 ++++++++++++++++++++++++++++---------------------
1 file changed, 87 insertions(+), 66 deletions(-)
--
1.8.5.1
next reply other threads:[~2013-12-17 1:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 1:39 Peter Crosthwaite [this message]
2013-12-17 1:40 ` [Qemu-devel] [PATCH v1 01/11] char/cadence_uart: Mark struct fields as public/private Peter Crosthwaite
2013-12-18 23:15 ` Andreas Färber
2013-12-18 23:21 ` Peter Crosthwaite
2013-12-17 1:40 ` [Qemu-devel] [PATCH v1 02/11] char/cadence_uart: Add missing uart_update_state Peter Crosthwaite
2013-12-17 1:41 ` [Qemu-devel] [PATCH v1 03/11] char/cadence_uart: Fix reset Peter Crosthwaite
2013-12-17 1:42 ` [Qemu-devel] [PATCH v1 04/11] char/cadence_uart: s/r_fifo/rx_fifo Peter Crosthwaite
2013-12-17 1:42 ` [Qemu-devel] [PATCH v1 05/11] char/cadence_uart: Simplify status generation Peter Crosthwaite
2013-12-17 1:43 ` [Qemu-devel] [PATCH v1 06/11] char/cadence_uart: Define Missing SR/ISR fields Peter Crosthwaite
2013-12-17 1:43 ` [Qemu-devel] [PATCH v1 07/11] char/cadence_uart: Remove TX timer & add TX FIFO state Peter Crosthwaite
2013-12-17 1:44 ` [Qemu-devel] [PATCH v1 08/11] char/cadence_uart: Fix can_receive logic Peter Crosthwaite
2013-12-17 1:45 ` [Qemu-devel] [PATCH v1 09/11] char/cadence_uart: Use the TX fifo for transmission Peter Crosthwaite
2013-12-17 1:45 ` [Qemu-devel] [PATCH v1 10/11] char/cadence_uart: Delete redundant rx rst logic Peter Crosthwaite
2013-12-17 1:46 ` [Qemu-devel] [PATCH v1 11/11] char/cadence_uart: Implement Tx flow control Peter Crosthwaite
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=cover.1387244071.git.peter.crosthwaite@xilinx.com \
--to=peter.crosthwaite@xilinx.com \
--cc=antonynpavlov@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).