You are not logged in.

#1 2025-05-28 23:49:30

youhu
Member
Registered: 2025-05-28
Posts: 3

New linux-rt has enabled CONFIG_PREEMPT_LAZY and its behavior degraded

There's finally a new linux-rt kernel. However, its behavior is shit, as highlighted by running:

sudo cyclictest -S --policy=fifo

In my machines, latencies quickly go above a millisecond, presenting a major regression relative to older linux-rt kernels.

I did some digging, and narrowed it down to the new lazy preemption being enabled:

# zgrep LAZY /proc/config.gz 
CONFIG_ARCH_HAS_PREEMPT_LAZY=y
CONFIG_PREEMPT_LAZY=y
CONFIG_RCU_LAZY=y
# CONFIG_RCU_LAZY_DEFAULT_OFF is not set
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# dmesg |grep -i lazy
[    0.151042] Dynamic Preempt: lazy
[    0.518767] iommu: DMA domain TLB invalidation policy: lazy mode

This is probably a good approach for the linux package, but it is ill-suited for linux-rt, which we use because we need low latency.

Offline

#2 2025-05-29 00:00:47

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: New linux-rt has enabled CONFIG_PREEMPT_LAZY and its behavior degraded

Nobody relevant will probably see this on the forum.  You will need to file a bug report on gitlab.

Offline

#3 2025-05-29 02:08:56

youhu
Member
Registered: 2025-05-28
Posts: 3

Re: New linux-rt has enabled CONFIG_PREEMPT_LAZY and its behavior degraded

I will likely do that.

As per how bad it is, in the max column I am seeing latencies above 10ms, whereas old linux-rt managed to keep in lower hundred microseconds. Not really better than the standard "linux" kernel.

Offline

Board footer

Powered by FluxBB