Quantcast
Viewing all articles
Browse latest Browse all 1267

Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers

Linus Torvalds writes: (Summary) There's no subtle lack of locking, or some optimistic access to a value that can change.
can change.
The compiler can generate code to read the value fifteen billion times, and it will always get the same value.
times, and it will always get the same value.
Yes, maybe in between the different accesses, an NMI will happen, and the value will be incremented, but then as the NMI exits, it will decrement again, so the code that got interrupted will not actually see the change.
see the change.
So the READ_ONCE() isn't "paranoia".

Viewing all articles
Browse latest Browse all 1267

Trending Articles