Author Archives: paulmckrcu

Stupid RCU Tricks: How Read-Intensive is The Kernel’s Use of RCU?

RCU is a specialized synchronization mechanism, and is typically used where there are far more readers (rcu_read_lock(), rcu_read_unlock(), rcu_dereference(), and so on) than there are updaters (synchronize_rcu(), call_rcu(), rcu_assign_pointer(), and so on). But does the Linux kernel really make heavier … Continue reading

Posted in Uncategorized | Tagged , , | Comments Off on Stupid RCU Tricks: How Read-Intensive is The Kernel’s Use of RCU?

Stupid RCU Tricks: Is RCU Watching?

It is just as easy to ask why wouldn’t RCU be watching all the time. After all, you never know when you might need to synchronize! Unfortunately, the concept of an eternally watchful RCU is problematic in the context of … Continue reading

Posted in Uncategorized | Comments Off on Stupid RCU Tricks: Is RCU Watching?

Parallel Programming: December 2021 Update

It is past time for another release of Is Parallel Programming Hard, And, If So, What Can You Do About It?. But first, what is the difference between an edition and a release? The main difference is the level of … Continue reading

Posted in Uncategorized | Tagged , | Comments Off on Parallel Programming: December 2021 Update

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: Creating Branches For the -rcu Tree

Several people have expressed interest in how I go about creating the topic branches in the -rcu tree. So when I created branches earlier this week, I actually kept track. But why bother with topic branches? In my case, reason … Continue reading

Posted in Uncategorized | Tagged | Comments Off on Stupid RCU Tricks: Creating Branches For the -rcu Tree

What Memory Model Should the Rust Language Use?

UNDER CONSTRUCTION This blog post discusses a few alternative Rust-language memory models. I hope that this discussion is of value to the Rust community, but in the end, it is their language, so it is also their choice of memory … Continue reading

Posted in Uncategorized | Tagged , , | Comments Off on What Memory Model Should the Rust Language Use?

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

Verification Challenges

You would like to do some formal verification of C code? Or you would like a challenge for your formal-verification tool? Either way, here you go!       Stupid RCU Tricks: rcutorture Catches an RCU Bug, also known as … Continue reading

Posted in Uncategorized | Tagged , , | Comments Off on Verification Challenges

TL;DR: Memory-Model Recommendations for Rusting the Linux Kernel

These recommendations assume that the initial Linux-kernel targets for Rust developers are device drivers that do not have unusual performance and scalability requirements, meaning that wrappering of small C-language functions is tolerable. (Please note that most device drivers fit into … Continue reading

Posted in Uncategorized | Tagged , , | Comments Off on TL;DR: Memory-Model Recommendations for Rusting the Linux Kernel

Rusting the Linux Kernel: Summary and Conclusions

We have taken a quick trip through history, through a number of the differences between the Linux kernel and the C/C++ memory models, sequence locks, RCU, ownership, zombie pointers, and KCSAN. I give a big “thank you” to everyone who … Continue reading

Posted in Uncategorized | Tagged , , | Comments Off on Rusting the Linux Kernel: Summary and Conclusions