lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 01/24] Documentation: locking: Describe seqlock design and usage
On Mon, Jul 20, 2020 at 09:35:51PM -0400, Steven Rostedt wrote:
> On Mon, 20 Jul 2020 17:55:07 +0200
> "Ahmed S. Darwish" <a.darwish@linutronix.de> wrote:
> > +Read path, three categories:
> > +
> > +1. Normal Sequence readers which never block a writer but they must
> > + retry if a writer is in progress by detecting change in the sequence
> > + number. Writers do not wait for a sequence reader::
> > +
> > + do {
> > + seq = read_seqbegin(&foo_seqlock);
> > +
> > + /* ... [[read-side critical section]] ... */
> > +
> > + } while (read_seqretry(&foo_seqlock, seq));
> > +
> > +2. Locking readers which will wait if a writer or another locking reader
> > + is in progress. A locking reader in progress will also block a writer
> > + from entering its critical section. This read lock is
> > + exclusive. Unlike rwlock_t, only one locking reader can acquire it::
>
> Nit, but I would mention that this acts similar to a normal spin_lock,
> and even disables preeption (in the non-RT case).

will do.

Thanks,

--
Ahmed S. Darwish
Linutronix GmbH

\
 
 \ /
  Last update: 2020-07-21 07:35    [W:0.964 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site