Re: [RFC PATCH v2 1/2] printk-rb: add a new printk ringbuffer implementation
From: Andrea Parri
Date: Fri Jun 21 2019 - 08:17:03 EST
> > FWIW (and as anticipated time ago in a private email), when I see code
> > like this I tend to look elsewhere... ;-/
>
> Do you really mean "code" or are you just referring to "code comments"?
> If you really mean code, then I'd appreciate some feedback about what
> should change.
I really just meant "uncommented code". ;-) I do plan to read your:
https://lkml.kernel.org/r/87k1df28x4.fsf@xxxxxxxxxxxxx
(and the code it's referring to) with due calm in the following days.
Thank you in advance for these remarks.
[Trying to address your question about herd7,]
A list of supported primitives is available from:
tools/memory-model/linux-kernel.def (left column)
This includes cmpxchg() (and its variants: _relaxed(), _acquire() and
_release()), however, herd7 can currently only parse statements like:
loc_var = cmpxchg(addr, old, new);
(and it will complain loudly without that "loc_var = " part...); this
is something that could be improved, or at least it seems this way...
A similar consideration holds for all the value-returning primitives.
Thanks,
Andrea