Performance

How the Linux Workqueue Subsystem Works: Worker Pools, max_active, and Why Deferred Work Runs in Process Context

A driver that finishes an interrupt handler cannot allocate memory, take a mutex, or call into the block layer. The interrupt context is ato...

Sarthak Bystander 27 Nov, 2026

How the Linux Context Switch Works: switch_to, Kernel Stacks, and Lazy FPU Restoration

A thread that calls sched_yield() or blocks on a futex does not leave its registers sitting in the CPU. The core must start executing anothe...

Sarthak Bystander 26 Nov, 2026

How the Linux Timekeeping Subsystem Works: Clocksources, Mult/Shift Scaling, and Why the vDSO Answers clock_gettime Without a Trap

A process that calls clock_gettime(CLOCK_MONOTONIC) ten million times a second does not expect each call to trap into the kernel. On a moder...

Sarthak Bystander 15 Nov, 2026

How Transparent Huge Pages Work: Collapse, Split, and Why the Kernel Tries to Hide 2 MiB Pages

A process that allocates a multi-gigabyte heap does not have to map every 4 KiB page through its own page-table entry. On x86-64 the hardwar...

Sarthak Bystander 4 Nov, 2026

How NUMA Works: Nodes, Distance, and Why First-Touch Allocation Matters

A process that calls malloc for a multi-gigabyte buffer on a two-socket server does not receive equal-cost memory. The physical frames behin...

Sarthak Bystander 18 Oct, 2026

How NAND Flash and the FTL Work: Pages, Erase Blocks, and Why a Small Write Rewrites a Block

A database that updates a 4 KiB page does not update a 4 KiB cell on the SSD. The host sends a logical block address. The drive's flash ...

Sarthak Bystander 4 Oct, 2026

How epoll Works: Readiness, Level vs Edge Trigger, and Why select Doesn't Scale

A process that accepts ten thousand TCP connections cannot afford to ask the kernel about each socket in turn. select(2) and poll(2) copy ...

Sarthak Bystander 24 Sept, 2026

How Linux CFS Works: vruntime, Red-Black Trees, and Why Fairness Is Approximate

A CPU core runs one thread at a time. Everything else that looks concurrent is a lie the operating system maintains by switching. The policy...

Sarthak Bystander 22 Sept, 2026

How eBPF Works: Verifier, Maps, JIT, and Why the Kernel Runs Your Code

A kernel module can do almost anything. That is why loading one is a privileged act and why a bug in one can take the machine with it. eBPF ...

Sarthak Bystander 21 Sept, 2026

How io_uring Works: Submission Queues, Completion Queues, and Why Batching Beats Syscalls

A tight loop of read and write pays for a privilege crossing on every operation. After Spectre-era mitigations that crossing got more expe...

Sarthak Bystander 19 Sept, 2026

How CPU Caches Work: Lines, Associativity, and False Sharing

A load that misses DRAM can cost hundreds of cycles. A load that hits L1 often costs a handful. That gap is why two programs with the same b...

Sarthak Bystander 18 Sept, 2026