McKenney: Stupid RCU Tricks: Is RCU Watching?

Post Syndicated from original https://lwn.net/Articles/896511/

Paul McKenney writes
about why read-copy-update coverage is not universal
in the kernel, the
hazards that can result from that, and what is being done to improve the
situation.

Unfortunately, an eternally watchful RCU is impractical in the
Linux kernel due to energy-efficiency considerations. The problem
is that if RCU watches an idle CPU, RCU needs that CPU to execute
instructions. And making an idle CPU unnecessarily execute
instructions (for a rather broad definition of the word
“unnecessary”) will terminally annoy a great many people in the
battery-powered embedded world. And for good reason: Making RCU
avoid watching idle CPUs can provide 30-40% increases in battery
lifetime.