Repository navigation
sys-kernel/coreos-modules: Enable CONFIG_PCIE_PTM - #4345
Open
hilljordan5768 wants to merge 1 commit into
Open
hilljordan5768 wants to merge 1 commit into
hilljordan5768 wants to merge 1 commit into
Conversation
Without CONFIG_PCIE_PTM, igc and other drivers can't enable PCIe
Precision Time Measurement ("PCIe PTM not supported by PCIe
bus/controller"), so their PHCs offer no PTP_SYS_OFFSET_PRECISE.
phc2sys and chrony then fall back to PTP_SYS_OFFSET_EXTENDED, which
brackets each PHC read between system clock reads a few microseconds
apart.
PCIE_PTM depends only on PCI, and its help text says it is safe to
enable on systems without PTM-capable devices. It goes in commonconfig
so amd64 and arm64 both get it.
On amd64 it also turns ICE_HWTS back on, which gives ice (E810) PHCs
precise cross-timestamps. Stable 4757.2.1 has ICE_HWTS=y, but 6.18
made it depend on PCIE_PTM, so olddefconfig on main leaves it unset.
Issue: flatcar/Flatcar#2457
Signed-off-by: Jordan Hill <jordan@hillmedia.org>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flatcar builds its kernel without
CONFIG_PCIE_PTM, soigccan't enable PCIe Precision Time Measurement even when the root port and the NIC support it:Without PTM the PHC offers no
PTP_SYS_OFFSET_PRECISE.phc2sysand chrony fall back toPTP_SYS_OFFSET_EXTENDED, which brackets each PHC read between two system clock reads a few microseconds apart.PCIE_PTMdepends only onPCI, and its help text says it is safe to enable without PTM-capable devices. I put it incommonconfig-6.18so amd64 and arm64 both get it. On amd64 it also turnsICE_HWTSback on, which gives E810 PHCs precise cross-timestamps. Stable 4757.2.1 hasICE_HWTS=y, but 6.18 made it depend onPCIE_PTM, soolddefconfigon main leaves it unset.Fixes flatcar/Flatcar#2457
AI use: I used Claude Code to make the config change, write the changelog entry and commit message, build the test image in the SDK, and run the tests below on my hardware.
How to use
On a host with a PTM-capable root port and an
igcNIC,dmesgshowsigc ...: PTM enabled, andphc_ctl /dev/ptpN capsreports cross timestamping support.Testing done
I built main (
4867.0.0+nightly-20261028-2100) with this change in the SDK. Both kernel packages built from source.Then I installed the dev-signed payload on a bare-metal Stable 4757.2.1 host with three Intel I226 NICs behind PTM-capable root ports:
Before, on Stable 4757.2.1 (6.12.111-flatcar):
After, on 4867.0.0 nightly with this change (6.18.58-flatcar):
ptp1andptp2give the samephc_ctlresult.To see what PTM buys, I sampled each PHC against
CLOCK_MONOTONIC_RAWat 10 Hz for 2 minutes on the PTM boot, reading both ways back to back. None of the 7200 reads failed. Scatter is the RMS residual after a quadratic fit in 10 s chunks:EXTENDED also reads 516 to 709 ns away from PRECISE, and the gap differs per port. Comparing two PHCs through EXTENDED on this host carries a constant error of up to about 200 ns.
For arm64 I only checked that
make olddefconfigkeepsCONFIG_PCIE_PTM=ywitharm64_defconfig-6.18. I have no arm64 PTM hardware to boot.changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc. (needs a maintainer to start CI)🤖 Generated with Claude Code