From: Al Viro <viro@ZenIV.linux.org.uk>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Waiman Long <waiman.long@hp.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
"Chandramouleeswaran, Aswin" <aswin@hp.com>,
"Norton, Scott J" <scott.norton@hp.com>
Subject: Re: [PATCH 1/2] seqlock: Add a new blocking reader type
Date: Wed, 11 Sep 2013 19:52:48 +0100 [thread overview]
Message-ID: <20130911185248.GM13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20130911184038.GD29749@fieldses.org>
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...
prev parent reply other threads:[~2013-09-11 18:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 14:28 [PATCH 1/2] seqlock: Add a new blocking reader type Waiman Long
2013-09-11 14:28 ` [PATCH 2/2] dcache: use read_seqlock/unlock() in read_seqbegin_or_lock() & friend Waiman Long
2013-09-11 14:55 ` [PATCH 1/2] seqlock: Add a new blocking reader type Al Viro
2013-09-11 16:33 ` Waiman Long
2013-09-11 17:26 ` Al Viro
2013-09-11 18:34 ` Waiman Long
2013-09-11 18:40 ` J. Bruce Fields
2013-09-11 18:52 ` Al Viro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130911185248.GM13318@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=aswin@hp.com \
--cc=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scott.norton@hp.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=waiman.long@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).