ByteDance engineers spotted a stubborn source of scheduling delays buried inside the Linux kernel’s SMP code. They fixed it. The changes, now headed for Linux 7.3, let the scheduler preempt threads waiting on remote IPI completion. The payoff? A 90 percent drop in P99 latency for high-priority tasks.
Thomas Gleixner sent the pull request this week. The Linux 7.3 merge window had just opened. Phoronix first reported the details. The patch series targets the smp_call_function family of functions. Those routines keep preemption disabled for the entire operation, including the wait for remote CPUs to finish. On busy systems that wait can stretch out. One sluggish target CPU drags down everything.
And the impact adds up. Translation lookaside buffer flushes on x86_64 rely on IPIs. Process exit and page reclamation fire off several at once. The more remote CPUs involved, the longer the potential stall. Real-time threads suffer. Latency-sensitive user-space applications such as DPDK suffer even more. Existing behavior simply did not play nice with those workloads.
The fix introduces a per-task CPU mask.
This small structure tracks exactly which remote CPUs still need to complete their IPI work. Because the mask lives on the local task, the kernel can safely re-enable preemption before entering the wait loop. The extra memory cost stays moderate. The latency benefit does not. Gleixner spelled it out in the cover letter. He wrote, “Reduce the preemption disabled sections in smp_call_function*(). The various smp call functions keep preemption disabled across the full operation which includes the wait for completion. Especially the latter can take some time when one of the target CPUs is not immediately responding to the IPI, which can result in large latency spikes. To improve this provide a per task CPU mask to track the CPUs to wait for. That makes the information required for the wait task local and therefore allows to reenable preemption before the wait. While this comes with moderate extra memory cost this reduces SMP function call induced latency measured in a fleet for high priority tasks from ~17ms to ~1.5ms (~90%).”
That fleet measurement tells the story. Seventeen milliseconds down to one and a half. The P99 tail latency in DPDK testing fell by the same proportion. Such numbers matter in production data centers where even occasional spikes disrupt service-level objectives. They matter even more for real-time Linux deployments that already stretch the kernel’s guarantees.
But the change does not stand alone. Other scheduler work also targets Linux 7.3. Intel engineers sent patches to improve cluster load balancing on hybrid processors. Phoronix covered those improvements days earlier. The series refines how the scheduler handles P-cores and E-cores sharing cache resources. Earlier cluster-aware scheduling had shown weaknesses on these chips. The new code should tighten up the behavior without adding complexity.
Separately, a series nicknamed “flatten the pick” reached the tip/sched/core branch. Peter Zijlstra drove the effort. It adjusts EEVDF to use a single runqueue in certain cgroup scenarios. Gaming on older hardware stands to gain. The patches reduce scheduling noise that previously hurt frame timing on low-end systems. Phoronix detailed the gaming angle last month.
These pieces together paint a picture. Kernel developers keep sharpening the scheduler for modern hardware realities. Hybrid CPUs. Massive core counts. Latency-critical networking stacks. Each tweak removes another source of jitter. None of them qualifies as flashy on its own. Yet the cumulative effect matters for cloud providers, telcos, and anyone running real-time code on Linux.
Gleixner’s pull request now sits with Linus Torvalds. Barring unexpected objections it should land within days. The timing fits the merge window rhythm. Early feedback on the mailing list stayed positive. The per-task mask approach looks clean. The performance numbers hold up across fleet measurements. Real-time enthusiasts will likely test the patch set as soon as it appears in mainline.
So the Linux kernel inches forward again. One fewer place where a busy IPI waiter can ruin a high-priority thread’s day. One more reason for DPDK users to watch the 7.3 cycle closely. The numbers speak clearly. A 90 percent cut in tail latency does not happen every day. When it does, the industry takes notice.
Linux 7.3 SMP Overhaul Slashes Latency Spikes for Real-Time and DPDK Workloads first appeared on Web and IT News.
