Articles

Linux

What Happens to Your Data During a Linux read()? DMA, Page Cache, and CPU Copies

Follow a Linux buffered file read from storage to the page cache and user buffer. See what DMA handles, why the CPU …

9 min read
Hugo

Stacknote: How I Turned My Hugo Blog into an Open-Source Theme

How I extracted Stacknote from wanglong.cv into a reusable Hugo theme, with an editorial design, responsive covers, …

8 min read
Linux

TCP TIME_WAIT on Linux: When Closed Connections Become a Bottleneck

Why TCP TIME_WAIT survives close(), why Linux normally waits 60 seconds, and how to distinguish normal connection churn …

9 min read
Linux

False Sharing: Why Unrelated Writes Slow Each Other Down

Two threads updating separate variables can still slow each other down when both land on the same cache line. See why …

8 min read
Linux

Why Locking a Mutex Usually Doesn't Need a System Call

An uncontended pthread_mutex_lock() usually runs a few user-space atomic instructions and never enters the kernel. …

8 min read
Linux

sendfile() Promises Zero-Copy. Which Copies Does It Actually Remove?

sendfile() is marketed as zero-copy, but data still moves. See which two CPU copies the read()+write() path really …

8 min read
Linux

malloc(100 MiB) Succeeded, So Why Is RSS Barely Higher?

malloc(100 MiB) returning success does not mean 100 MiB is resident. Follow the glibc allocation path, brk vs mmap, …

12 min read
Linux

What Does TCP listen() Backlog Actually Control on Linux?

Does listen() backlog control the SYN queue or accept queue? Trace Linux 6.10 behavior through somaxconn, SYN cookies, …

7 min read
Linux

How epoll Wakes a Waiting Thread in the Linux Kernel

Trace epoll from epoll_ctl() registration to socket wakeups, ep_poll_callback(), ready-list delivery, ovflist races, …

8 min read
Linux

What Actually Happens During a Linux System Call on x86-64?

Follow a Linux system call across the x86-64 privilege boundary: registers, entry_SYSCALL_64, kernel stacks, KPTI, …

8 min read