11.1 RCU and Per-Thread-Variable-Based Statistical Counters
Keywords: perfbook_html

#
11.1 RCU and Per-Thread-Variable-Based Statistical Counters

Section described an implementation of statistical counters that provided excellent performance, roughly that of simple increment (as in the C ++ operator), and linear scalability -- but only for incrementing via inc_count(). Unfortunately, threads needing to read out the value via read_count() were required to acquire a global lock, and thus incurred high overhead and suffered poor scalability. The code for the lock-based implementation is shown in Figure on Page .

Quick Quiz 11.1: Why on earth did we need that global lock in the first place? End Quick Quiz

Subsections

- 11.1.1 Design
- 11.1.2 Implementation
- 11.1.3 Discussion