TOD clock synchronization

6.18 LPAR mode

Your Linux® instance might be part of an extended remote copy (XRC) setup that requires synchronization of the Linux time-of-day (TOD) clock with a Coordinated Timing Network (CTN).

Linux in LPAR mode supports server time protocol (STP) based TOD synchronization. Use the lsstp command to display the STP configuration for your Linux instance.

Attention: To avoid hanging I/O operations on XRC-enabled DASD, be sure that a reliable timing signal is available before enabling clock synchronization.
Note: For how to set and change leap second settings, see the chrony documentation.

Prerequisites

As of kernel 6.17, STP time steering is done in user space rather than in the Linux kernel. To enable this, ensure these prerequisites are fulfilled:
  • STP needs to be defined in the hardware configuration.
  • A user space time synchronization daemon that can handle PTP needs to be installed, for example chrony.
  • The Linux s390 PTP driver needs to be enabled with KCONFIG option CONFIG_PTP_S390.

How STP synchronization works

With STP enabled at boot time, STP synchronizes the TOD clock of a Linux instance with the STP timing network during the boot process. STP then steers the TOD clock to keep it in sync with the network. This synchronization is driven by STP, without active participation of the Linux kernel. You cannot enable STP for KVM guests, but KVM hosts pass their synchronized TODs on to their guests.

In contrast to earlier kernel versions, as of Linux kernel version 6.17 the clock is no longer steered by the kernel, but a userspace daemon like chrony, which sets up a special device for the STP clock, /dev/ptp_s390_stcke. If there's a mismatch between the STP clock and the system clock, chrony steers the system clock until it matches the STP clock.

Note: The Linux clock will not be steered if no daemon is running. In Linux kernels before 6.17, the clock is always steered by the kernel and no daemon was needed.