Skip to main content

13 docs tagged with "locking"

View all tags

Atomic Operations

atomict, the operation families, the ordering each does and does not carry, and why refcountt exists separately.

Choosing a Lock

The decision table, six worked selections, and the cost hierarchy from an uncontended atomic to cross-NUMA ping-pong.

Finding Locking Bugs

lockdep and what it proves, KCSAN for data races, and a real splat read line by line.

Lock-Free Patterns

Where the kernel genuinely goes lock-free, and an honest account of why most kernel code should not.

Memory Ordering and Barriers

Why a plain access is not safe, what each barrier actually orders, and why this is the page arm64 changes the most.

Per-CPU Data

Eliminating sharing rather than protecting it, and what that costs in preemption discipline.

RCU in Practice

The API, the ordering it encodes, and the rules that make RCU misuse silently fatal rather than loudly wrong.

RCU: The Idea

Readers that take no locks and pay nothing, writers that publish a new version and defer reclamation until every reader has left.

Reader-Writer Locks

Why a reader-writer lock is often slower than a plain one, and where rw_semaphore is genuinely the right answer.

Seqlocks

Lockless readers with a retry loop, the constraints that puts on a reader, and the canonical use in timekeeping.

Spinlocks

Busy-waiting and when it is right, the queued implementation, and the absolute rule against sleeping while holding one.