lkml.org 
[lkml]   [2010]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patches] seqlock: add barrier-less special cases for seqcounts
On Fri, Nov 12, 2010 at 03:52:55PM -0800, Linus Torvalds wrote:
> On Fri, Nov 12, 2010 at 3:06 PM, Nick Piggin <npiggin@kernel.dk> wrote:
> . ...
> > seq2 = read_seqlock_begin(&child->d_seq);
> > if (read_seqcount_retry(&dentry->d_seq, seq))
> > /* bail out */
>
> So the only issue is that this particular back-to-back sequence with
> these kinds of "take one seqlock and release the previous one" where
> you currently end up having basically one smp_rmb() at the end of
> "read_seqlock_begin()", only to be followed immediately by another one
> starting out the "read_seqcount_retry()"?

I think basically yes, I'll have to take another look at the code.


> If so, I think we should make _that_ operation ("move from one seqlock
> to another") be the special one, because it smells like in general,
> using the special non-locking versions is going to be a very subtle
> interface.

OK, that sounds like a good idea. I'll see if that's applicable.



\
 
 \ /
  Last update: 2010-11-15 04:53    [W:0.025 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site