Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2025 22:23:07 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 29d6968fd36d - releng/14.3 - EC2: Remove old broken_txfifo workaround
Message-ID:  <202505152223.54FMN7Zs059488@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/14.3 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=29d6968fd36d27b27f953d5c00f9763491b10734

commit 29d6968fd36d27b27f953d5c00f9763491b10734
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2025-05-14 23:36:26 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-05-15 22:22:44 +0000

    EC2: Remove old broken_txfifo workaround
    
    Early versions of Xen, including those used in the early days of EC2,
    had a bug in their UART emulation whereby the TX FIFO wouldn't send the
    expected interrupt when emptying; as a result, FreeBSD would write 16
    characters to the serial console and then stop because we thought the
    FIFO was forever full.
    
    In 2013 (1c60b24baa50) I added a loader tunable "hw.broken_txfifo"
    which spinwaits for the FIFO TX rather than relying on the interrupt,
    and enabled this in loader.conf in EC2 images.
    
    A decade later, this workaround is almost certainly no longer needed in
    EC2 -- most instances don't run Xen, and the bug was long since fixed
    in Xen anyway -- but we've been holding on to the workaround "just in
    case".  Unfortunately, the spinwait behaviour is causing latency spikes
    and triggering warnings from the ena(4) driver.
    
    This commit removes the hw.broken_txfifo setting from loader.conf in
    EC2 images, but leaves the loader tunable and associated code, since it
    has been necessary in some other environments.  (It seems that the TX
    FIFO missing-interrupts bug has been independently written at least
    three times!)
    
    Approved by:    re (cperciva)
    MFC after:      1 minute
    Sponsored by:   Amazon
    
    (cherry picked from commit 9a685c09f06a55b18589d75f9307563d84a17fa9)
    (cherry picked from commit eadda156a50d3487ec1e6fc78f6cfe2df42448fa)
---
 release/tools/ec2.conf | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index 1116faed4e9c..bac8bb0d0e67 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -58,11 +58,6 @@ ec2_common() {
 	# screenshot") which was introduced in 2016.
 	echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf
 
-	# Some older EC2 hardware used a version of Xen with a bug in its
-	# emulated serial port.  It is not clear if EC2 still has any such
-	# nodes, but apply the workaround just in case.
-	echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf
-
 	# Graviton 1 through Graviton 4 have a bug in their ACPI where they
 	# mark the PL061's pins as needing to be configured in PullUp mode
 	# (in fact the PL061 has no pullup/pulldown resistors).  Graviton 1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505152223.54FMN7Zs059488>