Re: [PATCH v1 09/25] Documentation: locking: Describe seqlock design and usage

From: Ahmed S. Darwish
Date: Mon May 25 2020 - 07:02:25 EST


Ahmed S. Darwish <a.darwish@xxxxxxxxxxxxx> wrote:
> > Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > > Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
...
> > >
> > > So I really really hate that... I _much_ prefer code comments to crappy
> > > documents.
> >
> > Agreed. Comments are much less likely to bitrot than documents. The
> > farther away the documentation is from the code, the quicker it becomes
> > stale.
> >
> > It's fine to add "See Documentation/..." but please don't *ever* remove
> > comments that's next to the actual code.
...
>
> Then, the brlock comment:
>
> This is not as cache friendly as brlock. Also, this may not work
> well for data that contains pointers, because any writer could
> invalidate a pointer that a reader was following.
>
> was removed not because it's moved to Documentation/locking/seqlock.rst,
> but because it's obsolete: 0f6ed63b1707 ("no need to keep brlock macros
> anymore...").
>

Hmm, the part about not including pointers is only mentiond in the RST
file though, and not at seqlock.h.

Anyway, ACK, I'll beef up the comments at seqlock.h and make sure they
are self-contained.

Thanks,

--
Ahmed S. Darwish
Linutronix GmbH