PCI serial ports useless for ntp with PPS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I have had for some time now a commercial GPS box with a precision
PPS (Pulse Per Second) output connected to a serial port CD line.
The accuracy of the edge of the PPS pulse from the box is +/- 1 nanosecond,
that is it has a worst case jitter of 1 nanosecond.
The ntpd program monitors the CD line on a serial interface using the
kernel pps_api which tells ntpd when the second transition occurs.
Until recently I was using an ISA motherboard and because of a
hardware failure had to replace the board with a PCIe motherboard
with an add in PCIe serial card.
The jitter in the PPS pulse processing went from a bit under 1 microsecond
to over 30 microseconds.
As the new motherboard is 4 GHz 16 core vs the old 2 GHz 4 core I was
expecting a small reduction in jitter due to the faster CPU and lower
core loading.
I have tried using rtirq to increase the priority but that made no
difference.
irqbalance is off the serial irq is always handled by the same core.
Running the low-latency kernel on the old motherboard improved performance
from a bit over 1 microsecond to a bit under 1 microsecond but has no
visible effect on the new motherboard.
It appears the issue is caused by the kernel insisting that the serial
port irq handling be done by fasteoi, i.e. level interrupts, instead of
edge interrupts.
This makes Ubuntu useless for running a stratum 1 ntp server on a PCIe
motherboard.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.4.0-121-
NonfreeKernelMo
ApportVersion: 2.20.11-
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
/dev/snd/
CasperMD5CheckR
CurrentDesktop: GNOME-Flashback
Date: Thu Jun 23 07:54:10 2022
HibernationDevice: RESUME=
InstallationDate: Installed on 2016-08-05 (2147 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
MachineType: Gigabyte Technology Co., Ltd. B460MDS3HAC
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 VESA VGA
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.187.31
SourcePackage: linux
UpgradeStatus: Upgraded to focal on 2020-11-09 (591 days ago)
dmi.bios.date: 11/23/2021
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F5
dmi.board.
dmi.board.name: B460M DS3H AC
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: Default string
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: B460 MB
dmi.product.name: B460MDS3HAC
dmi.product.sku: Default string
dmi.product.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
This change was made by a bot.