HomeFreeBSD

ns8250_drain: Drain without DELAY first

Description

ns8250_drain: Drain without DELAY first

In virtual machines with virtual UARTs which have fictitious baud
rates, it may be possible to drain the receive queue very quickly,
without needing to DELAY after each character. Attempt to read
(and discard) the receive queue as fast as possible, stopping for
a DELAY only when LSR_RXRDY is no longer asserted; assume that we
have finished draining the queue when LSR_RXRDY is asserted both
before and after a DELAY.

This speeds up the boot process in FreeBSD/Firecracker by 27 ms.

Reviewed by: imp, jrtc27
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D36184

Details

Provenance
cpercivaAuthored on Aug 12 2022, 11:45 PM
Reviewer
imp
Differential Revision
D36184: ns8250_drain: Drain without DELAY first
Parents
rG9c1bec9c21a2: nvmecontrol: improve namespace size unit of devlist command output
Branches
Unknown
Tags
Unknown