Intel Revises Work On Timed I/O PPS Functionality For Linux

Written by Michael Larabel in Intel on 21 December 2023 at 06:18 AM EST. 7 Comments
INTEL
Back in January I wrote about Intel working on a Timed I/O driver for Linux with PPS (Pulse Per Second) to help with time synchronization between multiple devices. There hasn't been much external talk about this Timed I/O / PPS functionality while today as we approach the end of the year a new set of Linux kernel patches were posted for wiring up this Intel PPS Generator functionality.

The Intel Timed I/O PPS functionality is about ensuring more accurate time synchronization between multiple devices. The patches confirm that Intel platforms since 2019 have supported Intel Timed I/O PPS and that this functionality is already being used within the likes of Google and Facebook (Meta).

Intel Timed I/O


A new "request for comments" was issued with the new patches. Intel engineer Lakshmi Sowjanya summed up this work as:
"The goal of the PPS(Pulse Per Second) hardware/software is to generate a signal from the system on a wire so that some third-party hardware can observe that signal and judge how close the system's time is to another system or piece of hardware.

Existing methods (like parallel ports) require software to flip a bit at just the right time to create a PPS signal. Many things can prevent software from doing this precisely. This (Timed I/O) method is better because software only "arms" the hardware in advance and then depends on the hardware to "fire" and flip the signal at just the right time.

To generate a PPS signal with this new hardware, the kernel wakes up twice a second, once for 1->0 edge and other for the 0->1 edge. It does this shortly (~10ms) before the actual change in the signal needs to be made. It computes the TSC value at which edge will happen, convert to a value hardware understands and program this value to Timed I/O hardware. The actual edge transition happens without any further action from the kernel.

The result here is a signal coming out of the system that is roughly 1,000 times more accurate than the old methods. If the system is heavily loaded, the difference in accuracy is larger in old methods. Facebook and Google are the customers that use this feature.

Application Interface:
The API to use Timed I/O is very simple. It is enabled and disabled by writing a '1' or '0' value to the sysfs enable attribute associated with the Timed I/O PPS device. Each Timed I/O pin is represented by a PPS device. When enabled, a pulse-per-second(PPS) synchronized with the system clock is continuously produced on the Timed I/O pin, otherwise it is pulled low.

The Timed I/O signal on the motherboard is enabled in the BIOS setup."

So we'll see where these patches lead and hopefully it won't be another 12 months before next hearing about this Intel Timed I/O PPS functionality. Granted the uses for this are rather nice but interesting to note the "roughly 1,000 times more accurate than the old methods."
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week