What makes system calls expensive: pipeline flushes and predictor resets, explained

abhi9u · x · 2026-11-04

Abhinav Upadhyay breaks down why system calls are far costlier than they look on Linux x86-64: the direct cost is the small bit of kernel code per call, but the bigger hit comes from microarchitectural side effects — every user/kernel transition makes the CPU drop its optimizations, flush pipelines, and reset predictor state, then rebuild them on return. That's why iouring and eBPF exist to minimize kernel crossings. A deep walkthrough of the kernel entry/exit path and its performance profile footprint.

Original post →

More from Infra

Infra channel →