P
Paul McKenney
paulmck.livejournal.com · Personal blog · on HN since 2011
Paul McKenney, a Linux kernel RCU maintainer, writes about parallel programming, memory models, RCU, and Rust in the kernel.
What HN saysCommenters recommend his series on transactional memory and his posts on Rust and RCU, with discussion of how hard kernel patterns are in Rust.
32HN people shared it
9linked it in comments
32stories submitted
680story points
2 years agolast shared
2011people per year2026
Most-shared posts
- 1So You Want to Rust the Linux Kernel?6 people · 244 points · first shared 2021 · 324 comments on HN
- 2Hardware Transactional Memory Everywhere2 people · 4 points · first shared 2012 · discussion on HN
- 3Stupid RCU Tricks: Is RCU Watching?2 people · 4 points · first shared 2022 · discussion on HN
- 4What does it mean to be an RCU implementation2 people · 2 points · first shared 2023 · discussion on HN
- 5642092 people · first shared 2021
- 6Homepage2 people · first shared 2022
- 7Is parallel programming hard, and, if so, what can you do about it?1 people · 135 points · first shared 2020 · 85 comments on HN
- 8What memory model should Rust use?1 people · 122 points · first shared 2021 · 149 comments on HN
- 9How read-intensive is the kernel's use of RCU? (2022)1 people · 54 points · first shared 2024 · 5 comments on HN
- 10Parallel Programming, a book by Paul McKenney1 people · 46 points · first shared 2011 · 6 comments on HN
- 11Stupid RCU Tricks: Enlisting the Aid of a Debugger1 people · 13 points · first shared 2020 · 1 comments on HN
- 12Verification Challenge 2: RCU NO_HZ_FULL_SYSIDLE1 people · 12 points · first shared 2015 · discussion on HN
- 13Rcutorture Catches an RCU Bug1 people · 8 points · first shared 2014 · discussion on HN
- 14Stupid SMP Tricks: A Review of Locking Engineering Principles and Hierarchy1 people · 8 points · first shared 2022 · discussion on HN
- 15Transactional Memory Everywhere: HTM and Cache Geometry1 people · 4 points · first shared 2012 · discussion on HN
What HN people wrote when they linked it
Pr0ject217 · 2022-02-07
EDIT:
Paste this hacky snippet into your browser's console to save all of the links into your clipboard:
(() =>
{
let result = [...document.querySelectorAll('td a')]
.map((link) =>
link &&
!link.href.includes('ycombinator') &&
!link.href.includes('javascript:void')
? link.href
: ''
)
.filter(Boolean);
result = [...new Set(result)];
result.sort();
copy(result.join('\n\n'));
})();
Just to help, here's a compiled-list of all of the links shared here so…
quotemstr · 2021-12-08
> This means that using it for the core parts may be feasible sooner rather than later, no?
More like much later. There are several performance-critical patterns used in the Linux kernel that are difficult to express in unsafe Rust and impossible to express in safe Rust.
See https://paulmck.livejournal.com/62436.html and especially https://paulmck.livejournal.com/64209.html
I think promoting the use of Rust for driver code is an excellent compromise.
As an aside, I'd like to see Linux go further and move many of these drivers to user space. Now that we have io_uring, old performance-based arguments for keeping certain drivers in ring 0 hold less weight.
jedbrown · 2013-06-26
I highly recommend Paul McKenney's blog series on this topic:
http://paulmck.livejournal.com/tag/transactional%20memory%20everywhere
VitalyAnkh · 2022-02-07
Paul E. McKenney's Journal: https://paulmck.livejournal.com/
volta83 · 2021-10-11
> Given that DEC Alpha famously had difficulty with RCU, it is only reasonable to ask how Rust will do with it.
> Including some wild speculation about how Rust's ownership model might be generalized
I recommend starting with the latests post in the series and the conclusions(https://paulmck.livejournal.com/64209.html and https://paulmck.livejournal.com/65056.html).
From the snippets at the beginning, it looks like the author documented how they started learning about how to solve these problems in Rust, and it does not take too long until the comment section starts pointing the author at crossbeam-rs, GhostCell, etc. which only start appearing in the series in the last couple of sections.
Learning Rust by implementing a linked-list is pretty hard, but "Learning Rust by implementing RCU" has to be, by far, the hardest way to learn Rust that I know of. Kudos to the author for pushing through this so quickly and thoroguly. The posts are all excellent.
I wish the author would go a little bit more into crossbeam-rs. One thing the author does not consider, is that a safe Rust interface to RCU is essentially a "proof of correctness" for RCU, i.e., it proves that using RCU via that interface cannot introduce undefined behavior. (Or maybe more technically, the contracts on the correctness of unsafe code within the safe wrapper provide a potentially incorrect "proof" of this).
AFAIK no such correctness proof for the C APIs exists (there are a couple of linters that catch some…
tux3 · 2022-11-18
Here's a pretty good blog post that discusses how the memory models could interact: https://paulmck.livejournal.com/65341.html
My understanding is that it might not be entirely settled yet, and is still being discussed. That could explain why there isn't much solid documentation written yet
sanxiyn · 2022-11-18
Some of you may want to read the entire series (in 14 parts). The index is here: https://paulmck.livejournal.com/62436.html
alexgartrell · 2021-10-20
I shared this perspective, but luckily my job is awesome and (in a routine 1:1!) Paul told me why it's less straightforward than I thought: https://paulmck.livejournal.com/62436.html
my takeaway was essentially that you get sweet perf wins from semantics that are hard to replicate with a type system that's also making really strong guarantees without making the code SUPER gross.
conductor · 2014-03-11
Here is Paul E. McKenney's announcement of the release: http://paulmck.livejournal.com/36854.html