Re: [PATCH] documentation: Fix two-CPU control-dependency example

Boqun Feng
2017-07-21T00:23:40Z

On Thu, Jul 20, 2017 at 04:07:14PM -0700, Paul E. McKenney wrote:
[...]
> >
> > So if I respin the patch with the extern, would you still feel reluctant?
>
> Yes, because I am not seeing how this change helps. What is this telling
> the reader that the original did not, and how does it help the reader
> generate good concurrent code?
>

One thing I think we probably should do is to make READ_ONCE() semantics
more clear, i.e. call it out that in our conceptual model for kernel
programming we always rely on the compiler to be serious about the
return value of READ_ONCE(). I didn't find the comment before
READ_ONCE() or memory-barriers.txt talking about something similar.

Or am I the only one having this kinda semantics guarantee in mind?

Regards,
Boqun

> Thanx, Paul
>