Tag Archives: rcu

Stupid RCU Tricks: Removing CONFIG_RCU_FAST_NO_HZ

The CONFIG_RCU_FAST_NO_HZ Kconfig option was added many years ago to improve energy efficiency for systems having significant numbers of short bursts of idle time. Prior to the addition of CONFIG_RCU_FAST_NO_HZ, RCU would insist on keeping a given idle CPU’s scheduling-clock … Continue reading

Posted in Uncategorized | Tagged , , , , | Comments Off on Stupid RCU Tricks: Removing CONFIG_RCU_FAST_NO_HZ

Stupid RCU Tricks: Waiting for Grace Periods From NMI Handlers

Suppose that you had a state machine implemented by NMI handlers, and that some of the transitions in this state machine need to wait for an RCU grace period to elapse. How could these state transitions be implemented? Before we … Continue reading

Posted in Uncategorized | Tagged , , | Comments Off on Stupid RCU Tricks: Waiting for Grace Periods From NMI Handlers

Stupid RCU Tricks: Making Race Conditions More Probable

Given that it is much more comfortable chasing down race conditions reported by rcutorture than those reported from the field, it would be good to make race conditions more probable during rcutorture runs than in production. A number of tricks … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: Making Race Conditions More Probable

Stupid RCU Tricks: Which tests do I run???

The rcutorture test suite has quite a few options, including locktorture, rcuscale, refscale, and scftorture in addition to rcutorture itself. These tests can be run with the assistance of either KASAN or KCSAN. Given that RCU contains kernel modules, there … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: Which tests do I run???

Stupid RCU Tricks: A tour through rcutorture

Although Linux-kernel RCU gets most of the attention, without rcutorture, RCU would not be what it is today. To see this, note that the old saying “If it ain’t tested, it don’t work!” is if anything more valid today than … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: A tour through rcutorture

Stupid RCU Tricks: The design of rcutorture

This installment of the rcutorture series takes a high-level look at its design. At the highest level, rcutorture is a stress test with a few unit-test components thrown in for good measure. It also includes scripts to handle both single-system … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: The design of rcutorture

Stupid RCU Tricks: rcutorture fails to find an RCU bug

I recently took a close look at rcutorture‘s console output and noticed the following string: rtbf: 0 rtb: 0. The good news is that there were no rcutorture priority-boosting failures (rtbf: 0). The bad news is that this was only because there was no … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: rcutorture fails to find an RCU bug

Stupid RCU Tricks: So rcutorture is Still Not Aggressive Enough For You?

An earlier post discussed ways of making rcutorture more aggressive, but even with these techniques, rcutorture‘s level of aggression is limited by build time on the one hand and the confines of a single system on the other. This post … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: So rcutorture is Still Not Aggressive Enough For You?

Stupid RCU Tricks: Torturing RCU Fundamentally, Parts IV and V

Continuing further into the Linux-kernel Documentation/RCU/Design/Requirements/Requirements.rst file uncovers RCU’s final two fundamental guarantees:   The common-case RCU primitives are unconditional, and RCU users can perform a guaranteed read-to-write upgrade. The first guarantee is trivially verified by inspection of the RCU … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: Torturing RCU Fundamentally, Parts IV and V

Stupid RCU Tricks: Torturing RCU Fundamentally, Part III

Even more reading of the Linux-kernel Documentation/RCU/Design/Requirements/Requirements.rst file encounters RCU’s memory-barrier guarantees. These guarantees are a bit ornate, but roughly speaking guarantee that RCU read-side critical sections lapping over one end of a given grace period are fully ordered with … Continue reading

Posted in Uncategorized | Tagged , , , | Comments Off on Stupid RCU Tricks: Torturing RCU Fundamentally, Part III