lkml.org 
[lkml]   [2013]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] seqlock: Add a new blocking reader type
On Wed, Sep 11, 2013 at 02:40:38PM -0400, J. Bruce Fields wrote:
> On Wed, Sep 11, 2013 at 06:26:25PM +0100, Al Viro wrote:
> > On Wed, Sep 11, 2013 at 12:33:35PM -0400, Waiman Long wrote:
> >
> > > >Folks, any suggestions on better names? The semantics we are getting is
> > >
> > > I will welcome any better name suggestion and will incorporate that
> > > in the patch.
> >
> > FWIW, the suggestions I've seen so far had been
> >
> > seq_exreadlock() [ex for exclusive]
> > seq_exclreadlock() [ditto, and IMO fails the "easily read over the phone"
> > test - /sekv-excre...ARRGH/]
> > seq_prot_readlock() [prot for protected, as in DLM protected read]
>
> Though the DLM protected read doesn't self-conflict either so that's a
> poor analogy, my bad.
>
> (Do the users really require that the read be exclusive?)

We want to exclude writers and since the writer is
lock:
spin_lock(&sl->lock), bump sl->sequence by 1, smp_wmb()
unlock:
smp_wmb(), bump sl->sequence by 1, spin_unlock(&sl->lock)
the obvious implementation for this new primitive is simply spin_{lock,unlock}
on the same spinlock...


\
 
 \ /
  Last update: 2013-09-11 21:41    [W:0.305 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site