PCI serial ports useless for ntp with PPS

Bug #1979669 reported by Jim Pennino
8
This bug affects 1 person
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-5.4.0-121-lowlatency 5.4.0-121.137
ProcVersionSignature: Ubuntu 5.4.0-121.137-lowlatency 5.4.189
Uname: Linux 5.4.0-121-lowlatency x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.20.11-0ubuntu27.24
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: jimp 4157 F.... pulseaudio
 /dev/snd/controlC1: jimp 4157 F.... pulseaudio
 /dev/snd/controlC0: jimp 4157 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: GNOME-Flashback:GNOME
Date: Thu Jun 23 07:54:10 2022
HibernationDevice: RESUME=UUID=90289c8f-5a00-46c4-8f1f-79dd26128f39
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-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 VESA VGA
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-121-lowlatency root=UUID=87214c6c-80d1-49cd-9759-5084e5e39a64 ro pci=noaer parport=0 threadirqs acpi_sci=edge
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-121-lowlatency N/A
 linux-backports-modules-5.4.0-121-lowlatency N/A
 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.asset.tag: Default string
dmi.board.name: B460M DS3H AC
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: Default string
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF5:bd11/23/2021:svnGigabyteTechnologyCo.,Ltd.:pnB460MDS3HAC:pvrDefaultstring:rvnGigabyteTechnologyCo.,Ltd.:rnB460MDS3HAC:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
dmi.product.family: B460 MB
dmi.product.name: B460MDS3HAC
dmi.product.sku: Default string
dmi.product.version: Default string
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Jim Pennino (penninojim) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.